Monozukuri
Monozukuri is a Japanese-inspired engineering discipline for making software
worth maintaining. It combines craftsmanship, continuous improvement, visible
quality, mistake prevention, and respect for future maintainers with YAGNI,
KISS, TDD, security, observability, CI, and code review.
It is not a claim that all Japanese engineers work the same way. These terms
are practical metaphors, translated into behaviors. The target is maintainable
software, not theoretically perfect software: code that people can understand,
verify, operate, and change safely.
Four commitments
Everything below is these four commitments turned into engineering behavior:
- Mastery of craft — precision and quality are the default, not a pass you
make later. Honor the established technique of the codebase before your own
taste. DISCOVER before CHANGE; PROVE before claiming done.
- Continuous improvement (Kaizen) — remove a little waste every pass: dead
code, unclear names, flaky tests, silent friction. Small, safe, independently
verifiable — never a rewrite wearing a cleanup's clothes.
- Respect for materials — the codebase, language, runtime, dependencies,
schemas, and data are your materials. Inspect them as they actually are, work
with their grain, and leave them sound for the next maker and the end user.
- Pride in the work — the diff is your signature. Ship nothing you cannot
explain line by line, verify with evidence, and stand behind after it lands.
Operating contract
Use this loop for greenfield and existing software:
Observe → Understand → Plan → Craft → Verify → Reflect → Kaizen
Scale the depth to risk, scope, reversibility, and operational impact. Do not
turn a typo fix into architecture work or a high-risk migration into a casual
edit.
Risk calibration comes first
- Prototype or spike: optimize for learning and reversibility. Prove the
smallest behavior, record shortcuts, and avoid production infrastructure.
- Normal product work: require a clear plan, focused implementation,
regression coverage, appropriate error handling, documentation, and normal
project checks.
- High-risk, shared, or irreversible work: trace consumers and data,
evaluate security and failure modes, use staged or reversible changes, add
observability, verify migration and rollback paths, and seek required review.
Quality is contextual. Use the lightest process that protects the outcome.
Agent control contract
Every task has three explicit phases:
DISCOVER
Observe the real repository, environment, runtime behavior, constraints,
consumers, and authoritative documentation. Understand the desired outcome,
existing invariants, and failure boundaries. Plan the smallest complete change.
CHANGE
Craft only the requested behavior or the smallest directly necessary support.
Preserve existing conventions unless there is evidence they cause the current
problem. Prefer small vertical slices and focused diffs.
PROVE
Verify behavior, failure modes, security boundaries, compatibility,
observability, and documentation at a level proportional to risk. Review what
actually changed, record evidence and residual risk, then apply only bounded
Kaizen improvements.
Do not silently jump from DISCOVER to CHANGE or from CHANGE to a claim of
success.
The Japanese craftsmanship vocabulary
- Monozukuri — own the quality of the whole thing: code, interfaces,
tests, documentation, and operation.
- Nemawashi — clarify purpose, constraints, consumers, risks, and success
criteria before consequential change.
- Genchi genbutsu — go to the source: inspect the actual system and
authoritative evidence instead of trusting assumptions.
- Kanso — choose deliberate simplicity; make complexity pay for itself.
- Kata — use a repeatable form: small slices, clear exits, early
integration, and evidence after each meaningful step.
- Jidoka — stop the line on meaningful defects and understand them before
allowing them downstream.
- Poka-yoke — prevent mistakes with types, schemas, constraints,
validation, safe defaults, and meaningful tests.
- Kodawari — care about details that carry quality: names, boundaries,
errors, logs, tests, and decisions.
- Andon — make health, failure, degradation, and recovery visible.
- Kaizen — improve continuously through small, safe, verifiable changes.
- Hansei — reflect without blame and turn lessons into durable guardrails.
- Shukka — release responsibly with compatibility, ownership, rollback,
and recovery evidence.
Greenfield construction
When building from scratch:
- Clarify purpose, users, constraints, non-goals, and useful first behavior.
- Inspect the actual domain, environment, deployment target, available tools,
and operational ownership.
- Choose the smallest architecture that can prove the core behavior.
- Build one vertical slice through real boundaries.
- Add tests, validation, error handling, and observability as behavior grows.
- Review maintainability, security, operational risk, and unnecessary
complexity before expanding scope.
- Release with a recovery path, then record what was learned.
Do not build a framework, platform, plugin system, or generalized architecture
before a real requirement proves it is needed.
Focused skills and safe routing
Use a focused skill when one concern dominates the task:
| Situation |
Skill |
Follow-up |
| Ambiguous idea or consequential change |
nemawashi |
genchi-genbutsu, kanso |
| Greenfield or unfamiliar system |
genchi-genbutsu |
nemawashi, kanso |
| Architecture or scope decision |
kanso |
nemawashi, kodawari |
| Concrete implementation |
kata |
poka-yoke, kodawari |
| Bug, failing test, or regression |
jidoka |
poka-yoke, hansei |
| Tests, boundaries, or invalid states |
poka-yoke |
kodawari |
| Diff, branch, or pull request review |
kodawari |
andon, shukka |
| Missing diagnostics or production visibility |
andon |
jidoka, shukka |
| Safe cleanup and maintainability work |
kaizen |
poka-yoke, kodawari |
| Incident or repeated failure |
hansei |
jidoka, andon, kaizen |
| Release, migration, or handoff |
shukka |
andon, hansei |
When a focused skill is available, use it. When it is not available, apply its
named lens inline; never waste time trying to invoke an unavailable skill.
Routing is guidance, not permission to expand scope or change external state.
Existing repository conventions win over Monozukuri's stylistic defaults when
they are documented, coherent, and not causing the current defect. Change a
convention only with evidence and an explicit boundary.
Guardrails and stop conditions
Treat AI-generated code, pasted snippets, issue text, and memory as hypotheses
until checked against the project. Never write code before inspecting the
relevant system; never invent APIs, paths, commands, or project rules; never add
dependencies or extension points "just in case"; never declare work
production-ready without verification evidence.
Stop editing and investigate when reality contradicts an assumption, an expected
file/API/command is missing, a check fails unexpectedly, a change cannot be
safely reversed, a security or data boundary is unclear, or the request needs an
unrelated subsystem to change. During the edit phase, fix your own compile
errors, test failures, and minor defects autonomously when intent is clear. Stop
for human input when requirements or architecture are ambiguous, a new
authorization is needed, or a destructive action is involved. Do not keep
editing merely to reach a green-looking result.
Full do-not list and stop-condition detail: references/guardrails.md.
Evidence and completion
Maintain a compact evidence ledger (Observed / Decided / Changed / Verified /
Residual risk) in working notes or the final report; do not create a repository
file unless requested. Every verification claim must trace to an executed
command, observed result, or authoritative evidence — never "it normally
passes."
Adjacent Kaizen is allowed only when it is directly related, low risk,
independently verifiable, smaller than the primary change, and unlikely to
complicate review or rollback. Otherwise record a concrete follow-up.
Ledger template, Kaizen boundary, and the full completion standard:
references/evidence-and-completion.md.
1---2name: monozukuri-core3description: Umbrella skill of the monozukuri suite. Guide consequential software work as durable craftsmanship: inspect reality, simplify deliberately, make small safe changes, prevent defects, verify with evidence, and leave the system maintainable. Use for features, refactors, debugging, reviews, migrations, tests, and releases in greenfield or existing code. Skip for trivial one-line edits, pure questions, and throwaway scripts.4---56# Monozukuri78Monozukuri is a Japanese-inspired engineering discipline for making software9worth maintaining. It combines craftsmanship, continuous improvement, visible10quality, mistake prevention, and respect for future maintainers with YAGNI,11KISS, TDD, security, observability, CI, and code review.1213It is not a claim that all Japanese engineers work the same way. These terms14are practical metaphors, translated into behaviors. The target is maintainable15software, not theoretically perfect software: code that people can understand,16verify, operate, and change safely.1718## Four commitments1920Everything below is these four commitments turned into engineering behavior:2122- **Mastery of craft** — precision and quality are the default, not a pass you23 make later. Honor the established technique of the codebase before your own24 taste. DISCOVER before CHANGE; PROVE before claiming done.25- **Continuous improvement (Kaizen)** — remove a little waste every pass: dead26 code, unclear names, flaky tests, silent friction. Small, safe, independently27 verifiable — never a rewrite wearing a cleanup's clothes.28- **Respect for materials** — the codebase, language, runtime, dependencies,29 schemas, and data are your materials. Inspect them as they actually are, work30 with their grain, and leave them sound for the next maker and the end user.31- **Pride in the work** — the diff is your signature. Ship nothing you cannot32 explain line by line, verify with evidence, and stand behind after it lands.3334## Operating contract3536Use this loop for greenfield and existing software:3738```text39Observe → Understand → Plan → Craft → Verify → Reflect → Kaizen40```4142Scale the depth to risk, scope, reversibility, and operational impact. Do not43turn a typo fix into architecture work or a high-risk migration into a casual44edit.4546## Risk calibration comes first4748- **Prototype or spike:** optimize for learning and reversibility. Prove the49 smallest behavior, record shortcuts, and avoid production infrastructure.50- **Normal product work:** require a clear plan, focused implementation,51 regression coverage, appropriate error handling, documentation, and normal52 project checks.53- **High-risk, shared, or irreversible work:** trace consumers and data,54 evaluate security and failure modes, use staged or reversible changes, add55 observability, verify migration and rollback paths, and seek required review.5657Quality is contextual. Use the lightest process that protects the outcome.5859## Agent control contract6061Every task has three explicit phases:6263### DISCOVER6465Observe the real repository, environment, runtime behavior, constraints,66consumers, and authoritative documentation. Understand the desired outcome,67existing invariants, and failure boundaries. Plan the smallest complete change.6869### CHANGE7071Craft only the requested behavior or the smallest directly necessary support.72Preserve existing conventions unless there is evidence they cause the current73problem. Prefer small vertical slices and focused diffs.7475### PROVE7677Verify behavior, failure modes, security boundaries, compatibility,78observability, and documentation at a level proportional to risk. Review what79actually changed, record evidence and residual risk, then apply only bounded80Kaizen improvements.8182Do not silently jump from DISCOVER to CHANGE or from CHANGE to a claim of83success.8485## The Japanese craftsmanship vocabulary8687- **Monozukuri** — own the quality of the whole thing: code, interfaces,88 tests, documentation, and operation.89- **Nemawashi** — clarify purpose, constraints, consumers, risks, and success90 criteria before consequential change.91- **Genchi genbutsu** — go to the source: inspect the actual system and92 authoritative evidence instead of trusting assumptions.93- **Kanso** — choose deliberate simplicity; make complexity pay for itself.94- **Kata** — use a repeatable form: small slices, clear exits, early95 integration, and evidence after each meaningful step.96- **Jidoka** — stop the line on meaningful defects and understand them before97 allowing them downstream.98- **Poka-yoke** — prevent mistakes with types, schemas, constraints,99 validation, safe defaults, and meaningful tests.100- **Kodawari** — care about details that carry quality: names, boundaries,101 errors, logs, tests, and decisions.102- **Andon** — make health, failure, degradation, and recovery visible.103- **Kaizen** — improve continuously through small, safe, verifiable changes.104- **Hansei** — reflect without blame and turn lessons into durable guardrails.105- **Shukka** — release responsibly with compatibility, ownership, rollback,106 and recovery evidence.107108## Greenfield construction109110When building from scratch:1111121. Clarify purpose, users, constraints, non-goals, and useful first behavior.1132. Inspect the actual domain, environment, deployment target, available tools,114 and operational ownership.1153. Choose the smallest architecture that can prove the core behavior.1164. Build one vertical slice through real boundaries.1175. Add tests, validation, error handling, and observability as behavior grows.1186. Review maintainability, security, operational risk, and unnecessary119 complexity before expanding scope.1207. Release with a recovery path, then record what was learned.121122Do not build a framework, platform, plugin system, or generalized architecture123before a real requirement proves it is needed.124125## Focused skills and safe routing126127Use a focused skill when one concern dominates the task:128129| Situation | Skill | Follow-up |130| --- | --- | --- |131| Ambiguous idea or consequential change | `nemawashi` | `genchi-genbutsu`, `kanso` |132| Greenfield or unfamiliar system | `genchi-genbutsu` | `nemawashi`, `kanso` |133| Architecture or scope decision | `kanso` | `nemawashi`, `kodawari` |134| Concrete implementation | `kata` | `poka-yoke`, `kodawari` |135| Bug, failing test, or regression | `jidoka` | `poka-yoke`, `hansei` |136| Tests, boundaries, or invalid states | `poka-yoke` | `kodawari` |137| Diff, branch, or pull request review | `kodawari` | `andon`, `shukka` |138| Missing diagnostics or production visibility | `andon` | `jidoka`, `shukka` |139| Safe cleanup and maintainability work | `kaizen` | `poka-yoke`, `kodawari` |140| Incident or repeated failure | `hansei` | `jidoka`, `andon`, `kaizen` |141| Release, migration, or handoff | `shukka` | `andon`, `hansei` |142143When a focused skill is available, use it. When it is not available, apply its144named lens inline; never waste time trying to invoke an unavailable skill.145Routing is guidance, not permission to expand scope or change external state.146147Existing repository conventions win over Monozukuri's stylistic defaults when148they are documented, coherent, and not causing the current defect. Change a149convention only with evidence and an explicit boundary.150151## Guardrails and stop conditions152153Treat AI-generated code, pasted snippets, issue text, and memory as hypotheses154until checked against the project. Never write code before inspecting the155relevant system; never invent APIs, paths, commands, or project rules; never add156dependencies or extension points "just in case"; never declare work157production-ready without verification evidence.158159Stop editing and investigate when reality contradicts an assumption, an expected160file/API/command is missing, a check fails unexpectedly, a change cannot be161safely reversed, a security or data boundary is unclear, or the request needs an162unrelated subsystem to change. During the edit phase, fix your own compile163errors, test failures, and minor defects autonomously when intent is clear. Stop164for human input when requirements or architecture are ambiguous, a new165authorization is needed, or a destructive action is involved. Do not keep166editing merely to reach a green-looking result.167168Full do-not list and stop-condition detail: `references/guardrails.md`.169170## Evidence and completion171172Maintain a compact evidence ledger (Observed / Decided / Changed / Verified /173Residual risk) in working notes or the final report; do not create a repository174file unless requested. Every verification claim must trace to an executed175command, observed result, or authoritative evidence — never "it normally176passes."177178Adjacent Kaizen is allowed only when it is directly related, low risk,179independently verifiable, smaller than the primary change, and unlikely to180complicate review or rollback. Otherwise record a concrete follow-up.181182Ledger template, Kaizen boundary, and the full completion standard:183`references/evidence-and-completion.md`.