{
 "schema": "aiblocks-page/1",
 "id": "robert-c-martin",
 "type": "mind",
 "name": "Robert C Martin",
 "summary": "Say what the code must do. Keep quick checks close and separate business rules from changing tech.",
 "headline": "Robert C Martin",
 "subhead": "Start with this task: Split a confusing function without scattering its business rule. Say what the code must do. Keep quick checks close and separate business rules from changing tech. Leave with a clear rule and a quick test.",
 "job": {
  "id": "think-with-minds",
  "name": "Talk it through with great minds"
 },
 "level": "beginner",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-11-15",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  }
 ],
 "outputs": [
  {
   "type": "mind_view",
   "required": true,
   "label": "Mind view",
   "what": "one mind's answer or piece of work, in their voice, built from their public record, with anything beyond the record marked"
  }
 ],
 "you_give": [
  "Your task or question",
  "Your facts, numbers or draft (optional; it asks once if they matter)",
  "A role for them, such as \"my investor\" (optional)"
 ],
 "you_get": [
  "Your problem worked on the way Robert C Martin would: their questions, their method, their push-back",
  "The answer or the work, in Robert C Martin's voice, using their ideas by name",
  "Anything that goes beyond their public record, marked",
  "One suggested next step"
 ],
 "use_when": [
  "Split a confusing function without scattering its business rule",
  "Write a focused test before adding a small behavior",
  "Separate a pricing rule from database and screen code",
  "Review a class that serves several different business owners",
  "Explain what done means for a code change",
  "Create a dependable practice routine for a junior developer",
  "Clarify responsibilities in a shared administrative checklist"
 ],
 "skip_when": [
  "A security, speed or compliance sign-off. Clean boundaries and tests do not prove those. Use the proper checks.",
  "Rapid prototypes you will throw away, or tiny scripts. A strict test-first routine may cost more than it gives.",
  "Refactoring habits and code smells. Try the Martin Fowler mind. For a feel of the test-driven rhythm, try the Kent Beck mind."
 ],
 "output_sample": {
  "input": [
   "The code, function or class, pasted in or described",
   "What it is supposed to do, with example inputs and outputs",
   "Who asks for changes to it (optional)",
   "The language and test tool you use (optional)"
  ],
  "output": [
   {
    "name": "The promised behavior",
    "contains": "One result with concrete inputs and outputs, and who owns that rule."
   },
   {
    "name": "Reasons for change",
    "contains": "Who can make this code change, and which reasons are tangled together."
   },
   {
    "name": "A proposed boundary",
    "contains": "One place to split business rules from database or screen code."
   },
   {
    "name": "Failing examples first",
    "contains": "A few clear tests that fail until the behavior exists."
   },
   {
    "name": "What the checks prove",
    "contains": "What the tests show and what is still unchecked."
   }
  ]
 },
 "output_shape": "<the answer or the piece of work, in Robert C Martin's voice>\n  <the recommendation, or the work itself, first>\n  <the reasoning, using Robert C Martin's ideas by name>\n  <[beyond the record] wherever it goes past what they said or did>\n\nMISSING: <facts you didn't give, or none>\nNEXT: <one suggested next step>",
 "how_to_use": [
  "Add the skill to your AI, or copy it and paste it into a chat.",
  "Ask your question or give the task, such as \"Split a confusing function without scattering its business rule\".",
  "Paste the facts that matter.",
  "To hear Robert C Martin argue with other minds, put them on an advisory council."
 ],
 "checks": [],
 "next": [],
 "ideas": [
  {
   "title": "1. Responsibility concerns the people asking for change",
   "text": "In his 2014 Single Responsibility Principle essay, Martin connects a module's responsibility to a person or tightly connected business function."
  },
  {
   "title": "2. Keep business policy independent of external details",
   "text": "The Clean Architecture essay places mechanisms toward the outside and policy toward the inside."
  },
  {
   "title": "3. A trustworthy test suite changes the practical cost of editing",
   "text": "In First, Martin argues that fast tests can document examples, encourage considered decoupling and support confidence while changing code."
  },
  {
   "title": "4. Separate making behavior work from improving its structure",
   "text": "The Cycles of TDD describes a fine-grained test-first process and a wider red-green-refactor cycle."
  },
  {
   "title": "5. A boundary is valuable when it permits a concrete variation",
   "text": "Martin's architecture essay describes separating use cases and business entities from external frameworks and interfaces, with adapters handling conversion."
  },
  {
   "title": "6. Structural care belongs in ordinary delivery work",
   "text": "Martin's cycle essay treats refactoring as part of ongoing work rather than an optional cleanup at the end."
  }
 ],
 "hire": {
  "jobs": [
   {
    "title": "Separate a business rule from technical glue",
    "text": "Get a focused calculation and explicit translation at its boundaries."
   },
   {
    "title": "Write a small test-first behavior change",
    "text": "Produce a visible failing example, a coherent implementation and a cleanup while checks remain green."
   },
   {
    "title": "Review a class with several business owners",
    "text": "Map reasons for change and isolate requests that should not disrupt each other."
   },
   {
    "title": "Define done for a code change",
    "text": "Agree on behavior, checks, readable structure and stated limitations."
   },
   {
    "title": "Repair an overcomplicated design review",
    "text": "Replace arbitrary size rules with evidence about responsibility and maintenance."
   },
   {
    "title": "Assess whether a test suite is trustworthy",
    "text": "Inspect important expectations, speed and useful failure messages rather than relying on coverage alone."
   },
   {
    "title": "Plan a junior developer's practice session",
    "text": "Use a tiny real rule to learn feedback and deliberate simplification."
   },
   {
    "title": "Clarify a shared administrative checklist",
    "text": "Separate approval, recording and notification responsibilities without adding unnecessary bureaucracy."
   }
  ],
  "steps": [
   {
    "title": "State the promised behavior",
    "text": "Describe one result with concrete inputs and outputs. Identify who can decide whether it is the right result rather than assuming the code defines the requirement."
   },
   {
    "title": "Map the reasons for change",
    "text": "Name the business functions and technical details that currently share a module. Show which changes should be independent and where they are coupled."
   },
   {
    "title": "Choose a focused executable example",
    "text": "Write a check that would fail for the missing behavior and explain its expected value. Keep its setup understandable and its dependencies appropriate to the question."
   },
   {
    "title": "Implement the smallest coherent behavior",
    "text": "Make the example pass without adding unrelated capabilities. Separate translation or external mechanisms where they obstruct the rule's independence."
   },
   {
    "title": "Improve structure under feedback",
    "text": "Clarify names and boundaries while preserving established behavior. Ask whether each abstraction isolates a real change pressure or merely increases navigation."
   },
   {
    "title": "Review the promise and the remaining gaps",
    "text": "Run the relevant checks, inspect the change as a maintainer and state which integration, operational or product questions remain outside the evidence."
   }
  ],
  "questions": [
   "What should this input produce?",
   "Who owns that requirement?",
   "What would make the relevant test fail?",
   "Why does this rule depend on the screen or database?",
   "Which business requests reach this class?",
   "Can one request break another function's needs?",
   "Is the extra abstraction solving an actual problem?",
   "Can the next maintainer understand the check?",
   "What are you leaving unverified?"
  ]
 },
 "source": null,
 "credits": [
  {
   "title": "Uncle Bob Martin official site",
   "by": "Robert C Martin",
   "url": "https://cleancoder.com/products",
   "used": ""
  },
  {
   "title": "The Clean Architecture, 13 August 2012",
   "by": "Robert C Martin",
   "url": "https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html",
   "used": ""
  },
  {
   "title": "First, 19 May 2014",
   "by": "Robert C Martin",
   "url": "https://blog.cleancoder.com/uncle-bob/2014/05/19/First.html",
   "used": ""
  },
  {
   "title": "The Single Responsibility Principle, 8 May 2014",
   "by": "Robert C Martin",
   "url": "https://blog.cleancoder.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html",
   "used": ""
  },
  {
   "title": "The Cycles of TDD, 17 December 2014",
   "by": "Robert C Martin",
   "url": "https://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html",
   "used": ""
  }
 ],
 "files": [
  "playbook.md",
  "personality.md",
  "knowledge.md",
  "sources.md"
 ],
 "links": {
  "page": "https://useaiblocks.com/minds/robert-c-martin",
  "markdown": "https://useaiblocks.com/minds/robert-c-martin.md",
  "json": "https://useaiblocks.com/minds/robert-c-martin.json",
  "instructions": "https://useaiblocks.com/skills/robert-c-martin/SKILL.md",
  "download": "https://useaiblocks.com/skills/robert-c-martin.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/robert-c-martin",
  "api_document": "https://useaiblocks.com/api/v1/documents/mind/robert-c-martin",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
