[memory] ADR-009: automation file writes must specify explicit text encodings
Engineering guardrails for AI coding agents
Brought to you by:
mnemehq
Originally created by: TheoV823
docs/adr/ADR-009-explicit-text-encoding-in-automation.md) — cross-language architectural decision: all automation file writes must specify encoding explicitly (UTF-8 for this repo). Covers PS, Python, Node, Bash. Defines required patterns, forbidden patterns, and enforcement implications.encoding_001 added to .mneme/project_memory.json decisions — constraints and anti-patterns match the ADR; enables pre-execution governance checks.docs/validation/governance-incident-log.md — documents the production incident that triggered this decision (49 site files silently corrupted by implicit Windows-1252 encoding, sync_shared.py crash, 30-min remediation).Real production incident on 2026-05-12 during a bulk footer update. PowerShell Set-Content without -Encoding utf8 re-encoded em-dash bytes (0xE2 0x80 0x94) as Windows-1252 0x97 (invalid UTF-8). No error at write time; failure surfaced downstream in sync_shared.py. Three additional commits required before deploy could proceed clean.
The ADR is scoped to the cross-language pattern (not PowerShell-specific) because the same silent-corruption risk exists in Python, Node, Bash, and Go under the wrong locale/runtime defaults.
Production incident (2026-05-12)
→ Governance Incident 002 (incident log)
→ ADR-009 (architectural decision)
→ encoding_001 (enforcement rule)
→ pre-execution pattern matching on automation scripts
encoding_001 constraints match the forbidden patterns in ADR-009project_memory.json is valid JSON🤖 Generated with Claude Code
Originally posted by: github-actions[bot]
mneme self-governance check
Mode:
warn- verdicts are visible but do not block merge. Rollout plan:.mneme/README.md.Summary: 0 pass, 0 warn, 0 fail
.mneme/project_memory.jsondocs/adr/ADR-009-explicit-text-encoding-in-automation.mdsite/404.htmlsite/_snippets/footer.htmlsite/about/index.htmlsite/benchmark/index.htmlsite/compare/coderabbit/index.htmlsite/compare/cursor-rules/index.htmlsite/compare/index.htmlsite/contact/index.htmlsite/demo/dependency-policy/index.htmlsite/demo/index.htmlsite/demo/repository-pattern/index.htmlsite/demo/storage-decision/index.htmlsite/docs/benchmark-methodology/index.htmlsite/docs/cli/index.htmlsite/docs/governance-violations/index.htmlsite/docs/how-enforcement-works/index.htmlsite/docs/index.htmlsite/docs/supported-languages/index.htmlsite/for/cto/index.htmlsite/for/index.htmlsite/for/platform/index.htmlsite/for/principal-engineer/index.htmlsite/founder/index.htmlsite/index.htmlsite/insights/ai-code-review-does-not-scale-linearly/index.htmlsite/insights/ai-coding-governance-should-be-reviewable/index.htmlsite/insights/architectural-governance-across-heterogeneous-ai-coding-agents/index.htmlsite/insights/deployment-quality-will-define-the-ai-era/index.htmlsite/insights/generative-ai-software-engineering-stack/index.htmlsite/insights/github-copilot-space-framework/index.htmlsite/insights/index.htmlsite/insights/mneme-vs-cursor-rules/index.htmlsite/insights/openai-compatible-apis-are-commoditizing-models/index.htmlsite/insights/prompt-engineering-is-not-governance/index.htmlsite/insights/review-is-not-governance/index.htmlsite/insights/rise-of-agentic-engineering-education/index.htmlsite/insights/what-is-the-ai-sdlc/index.htmlsite/insights/why-code-review-cannot-scale-with-ai-output/index.htmlsite/insights/why-prompt-memory-fails-at-scale/index.htmlsite/insights/why-rag-fails-for-architectural-governance/index.htmlsite/integrations/adr-import/index.htmlsite/integrations/claude-code/index.htmlsite/integrations/cursor/index.htmlsite/integrations/github-actions/index.htmlsite/integrations/index.htmlsite/og-integration-adr-import.htmlsite/pilot/index.htmlsite/platforms/index.htmlsite/privacy/index.htmlsite/roadmap/index.htmlsite/standards/index.htmlsite/supported-languages/index.htmlsite/supported-languages/javascript-governance/index.htmlsite/supported-languages/python-governance/index.htmlsite/supported-languages/typescript-governance/index.htmlsite/use-cases/coding-assistant-governance/index.htmlsite/use-cases/data-platform-governance/index.htmlsite/use-cases/design-system-governance/index.htmlsite/use-cases/index.htmlsite/use-cases/legacy-codebase-memory/index.htmlsite/use-cases/multi-agent-workflow-governance/index.htmlsite/use-cases/security-compliance-guardrails/index.htmlsite/works-with/index.htmlGenerated by
.github/workflows/mneme-check.yml· query = PR title + file path · scope = repo-governance paths.Ticket changed by: TheoV823