← All projects
13

Developer tools · template execution

Source Materializer

A Go tool that produces repeatable file plans, verifies inputs and then applies accepted templates.

MAT-001/002 implemented · boundary review ongoing
Period
2026 — present
Role
Tool developer

PROJECT / DECISION RECORD

From the problem to the implementation

  1. 01Problem

    Template authority and filesystem execution have different responsibilities and risks.

  2. 02Design decision

    Use inspect, plan and apply phases bound to deterministic hashes and explicit receipts.

  3. 03Implementation

    Go implementation of safe paths, SHA-256 plans, preflight, no-replace publishing and partial-failure receipts.

Structured from project notes; not a live product screen or an execution test.

Problem

13

Template authority and filesystem execution have different responsibilities and risks.

Source Materializer / file creation

  1. 01 / InspectValidate inputs

    Check template boundaries and input definitions.

  2. 02 / PlanPlan · SHA-256

    Bind the file plan to source content hashes.

  3. 03 / ApplyCREATE only

    Revalidate before publishing without replacing targets.

A map of MAT-001/002 source contracts; it does not imply every filesystem race is resolved.

Constraints

  • Reject traversal, conflicts and drift; never generate product logic or run arbitrary package installers.
  • Reject traversal, duplicate targets and accidental replacement.
  • Record partial-failure receipts instead of treating an interrupted apply as success.

Engineering decisions

  • Use inspect, plan and apply phases bound to deterministic hashes and explicit receipts.
  • Recheck plan digests against source and target state immediately before applying.
  • Use CREATE-only operations rather than overwriting existing files.

Implementation

  • Go implementation of safe paths, SHA-256 plans, preflight, no-replace publishing and partial-failure receipts.
  • Preflight checks digest/source/target drift.
  • Apply uses temporary files, hash verification, fsync, mode setting, no-replace publication and failure receipts.

Verification / evidence

Source evidenceObserved

README and Go 1.25.12 module describe MAT-001/002 implementation and plan/apply contracts.

Result / current state

MAT-001/002 source exists while remaining filesystem races are still tracked.

Current statusMAT-001/002 implemented · boundary review ongoing

Related projects