[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C8GYZWS261Y014Y7GG66AC":3,"skill-same:01M7C8GYZWS261Y014Y7GG66AC":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7C8GYZWS261Y014Y7GG66AC","pragmatic-programmer",null,"Apply meta-principles of software craftsmanship: DRY, orthogonality, tracer bullets, and design by contract. Use when the user mentions \"best practices\", \"pragmatic approach\", \"broken windows\", \"tracer bullet\", \"software craftsmanship\", \"avoid technical debt\", \"code ownership\", or \"how do I become a better developer\". Also trigger when evaluating build-vs-buy decisions, designing estimation approaches, or choosing between reversible and irreversible architectural decisions. Covers estimation, domain languages, and reversibility. For code-level quality, see clean-code. For refactoring techniques, see refactoring-patterns.","sung1-labs\u002Fsddx","sung1-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F325716214?v=4","01M7C7MDYAWVBFW42T3YCQYG7N","SunG1 Labs","01M7C7MDYZYBYQ5FNSK0XN0YY2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pragmatic-programmer\ndescription: 'Apply meta-principles of software craftsmanship: DRY, orthogonality, tracer bullets, and design by contract. Use when the user mentions \"best practices\", \"pragmatic approach\", \"broken windows\", \"tracer bullet\", \"software craftsmanship\", \"avoid technical debt\", \"code ownership\", or \"how do I become a better developer\". Also trigger when evaluating build-vs-buy decisions, designing estimation approaches, or choosing between reversible and irreversible architectural decisions. Covers estimation, domain languages, and reversibility. For code-level quality, see clean-code. For refactoring techniques, see refactoring-patterns.'\nlicense: MIT\nmetadata:\n  author: wondelai\n  version: \"1.4.0\"\n---\n\n# The Pragmatic Programmer Framework\n\nA systems-level approach to software craftsmanship from Hunt & Thomas' \"The Pragmatic Programmer\" (20th Anniversary Edition). Apply these meta-principles when designing systems, reviewing architecture, writing code, or advising on engineering culture -- how to think about software, not just how to write it.\n\n## Core Principle\n\n**Care about your craft.** Software development demands continuous learning, disciplined practice, and personal responsibility -- pragmatic programmers think beyond the immediate problem to context, trade-offs, and long-term consequences. Great software comes from great habits: avoid duplication ruthlessly, keep components orthogonal, and treat every line of code as a living asset that must earn its place. The goal is not perfection -- it is systems that are easy to change, easy to understand, and easy to trust.\n\n## Scoring\n\n**Goal: 10\u002F10.** Score against the seven Quick Diagnostic rows: award ~1.4 points per row answered \"yes\" (7 yes = 10). Then band the result:\n- **9-10**: every principle holds -- DRY knowledge, orthogonal layers, a working tracer slice, contracts at boundaries, no broken windows, reversible vendor\u002FDB choices, ranged estimates.\n- **5-6**: 1-2 violations that cost real change-effort (e.g. business logic coupled to the DB, single-point estimates).\n- **\u003C=3**: pervasive duplication, global state, or accumulated broken windows -- entropy is winning.\n\nAlways state the score, name the failing diagnostic rows, and give the specific fix from the Action column to reach 10\u002F10.\n\n## The Seven Meta-Principles\n\nSeven principles for building software that lasts:\n\n### 1. DRY (Don't Repeat Yourself)\n\n**Core concept:** Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. DRY is about knowledge, not code -- duplicated logic, business rules, or configuration are far more dangerous than duplicated syntax.\n\n**Why it works:** Duplicated knowledge must be changed in multiple places; eventually one gets missed, introducing inconsistency. DRY reduces the surface area for bugs and makes systems easier to change.\n\n**Key insights:**\n- DRY applies to knowledge and intent, not textual similarity -- two identical code blocks serving different business rules are NOT duplication\n- Four types of duplication: imposed (environment forces it), inadvertent (developers don't realize), impatient (too lazy to abstract), inter-developer (multiple people duplicate)\n- Comments that restate the code violate DRY -- explain *why*, not *what*\n- Database schemas, API specs, and documentation duplicate knowledge unless generated from a single source\n- The opposite of DRY is WET: \"Write Everything Twice\" or \"We Enjoy Typing\"\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Config values** | Single source of truth | DB connection in one env file, referenced everywhere |\n| **Validation rules** | Shared schema | One JSON Schema or Zod schema for client and server |\n| **API contracts** | Generate from spec | OpenAPI spec generates types, docs, and client code |\n\nSee: [references\u002Fdry-orthogonality.md](references\u002Fdry-orthogonality.md) when classifying a specific duplication or deciding whether two code blocks are truly the same knowledge -- per-type examples and mitigations for the four duplication types.\n\n### 2. Orthogonality\n\n**Core concept:** Two components are orthogonal if changes in one do not affect the other. Design systems where components are self-contained, independent, and have a single, well-defined purpose.\n\n**Why it works:** Decoupling localizes change -- a fix in one module can't ripple into unrelated ones, so blast radius stays bounded. Change the database layer and the UI should not break; change the auth provider and business logic should not care.\n\n**Key insights:**\n- Ask: \"If I dramatically change the requirements behind a function, how many modules are affected?\" The answer should be one\n- Eliminate effects between unrelated things -- a logging change should never break billing\n- Layered architectures promote orthogonality: presentation, domain logic, data access\n- Avoid global data -- every consumer of global state is coupled to it\n- Frameworks that force you to inherit from their classes reduce orthogonality\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Architecture** | Layered separation | Controller -> Service -> Repository, each replaceable |\n| **Dependencies** | Dependency injection | Pass a `Notifier` interface, not a `SlackClient` concrete class |\n| **Testing** | Isolated unit tests | Test business logic without database, network, or filesystem |\n\nSee: [references\u002Fdry-orthogonality.md](references\u002Fdry-orthogonality.md) when measuring coupling or refactoring toward decoupled layers -- the change-impact and stranger tests, layered-architecture diagram, and the helicopter analogy.\n\n### 3. Tracer Bullets and Prototypes\n\n**Core concept:** Tracer bullets are end-to-end implementations connecting all layers of the system with minimal functionality. Unlike prototypes (which are throwaway), tracer bullet code is production code -- thin but real.\n\n**Why it works:** Tracer bullets give immediate end-to-end feedback before you invest in filling out every feature. Users see something real, developers have a framework to build on, and integration issues surface early.\n\n**Key insights:**\n- Tracer bullet: thin but complete path through the system (UI -> API -> DB) -- you keep it\n- Prototype: focused exploration of a single risky aspect -- you throw it away\n- Use tracer bullets when \"shooting in the dark\" -- vague requirements, unproven architecture\n- If a tracer misses, adjust and fire again -- the cost of iteration is low\n- Label prototypes clearly as throwaway -- never let one become production code\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **New project** | Vertical slice | One feature end-to-end: button -> API -> DB -> response |\n| **Uncertain tech** | Spike prototype | Test WebSocket performance before committing |\n| **Microservice** | Walking skeleton | Hello-world service through the full CI\u002FCD pipeline |\n\nSee: [references\u002Ftracer-bullets.md](references\u002Ftracer-bullets.md) when deciding tracer vs. prototype on a new project or building a walking skeleton -- the shooting-in-the-dark decision, iteration loop, and common pitfalls.\n\n### 4. Design by Contract and Assertive Programming\n\n**Core concept:** Define and enforce the rights and responsibilities of software modules through preconditions (what must be true before), postconditions (what is guaranteed after), and invariants (what is always true). When a contract is violated, fail immediately and loudly.\n\n**Why it works:** Contracts make assumptions explicit. Instead of silently corrupting data or limping along in an invalid state, the system crashes at the point of the problem -- dead programs tell no lies.\n\n**Key insights:**\n- Preconditions: caller's responsibility -- \"I accept only positive integers\"\n- Postconditions: routine's guarantee -- \"I will return a sorted list\"\n- Invariants: always true -- \"Account balance never goes negative\"\n- Crash early: a dead program does far less damage than a crippled one\n- Use assertions for things that should never happen; error handling for things that might\n- In dynamic languages, implement contracts through runtime checks and guard clauses\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Function entry** | Precondition guard | `assert age >= 0, \"Age cannot be negative\"` at function start |\n| **Class state** | Invariant validation | `validate!` called after every state mutation |\n| **API boundary** | Schema validation | Validate request body against schema before processing |\n\nSee: [references\u002Fcontracts-assertions.md](references\u002Fcontracts-assertions.md) when adding contracts to a routine or deciding assertion vs. error handling -- worked pre\u002Fpost\u002Finvariant patterns, dynamic-language guard clauses, and the assertions-vs-error-handling boundary.\n\n### 5. The Broken Window Theory\n\n**Core concept:** One broken window -- a badly designed piece of code, a poor management decision, a hack that \"we'll fix later\" -- starts the rot. Once a system shows neglect, entropy accelerates and discipline collapses.\n\n**Why it works:** Psychology. When code is clean, developers feel social pressure to keep it that way; when code is already messy, the threshold for adding more mess drops to zero. Quality is a team habit, not an individual heroic effort.\n\n**Key insights:**\n- Don't leave broken windows (bad designs, wrong decisions, poor code) unrepaired\n- If you can't fix it now, board it up: a TODO with a ticket, a disabled feature, a stub\n- Be a catalyst for change: show people a working glimpse of the future (stone soup)\n- Watch for slow degradation (boiled frog) -- monitor tech debt metrics over time\n- The first hack is the most expensive because it gives permission for all subsequent hacks\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Legacy code** | Board up windows | Wrap bad code in a clean interface before adding features |\n| **Code review** | Zero-tolerance for new debt | Reject PRs adding `\u002F\u002F TODO: fix later` without a ticket |\n| **Tech debt** | Debt budget | Allocate 20% of each sprint to fixing broken windows |\n\nSee: [references\u002Fbroken-windows.md](references\u002Fbroken-windows.md) when a team is normalizing neglect or you need to drive a turnaround -- repair strategies, the stone-soup catalyst play, and building a culture of quality.\n\n### 6. Reversibility and Flexibility\n\n**Core concept:** There are no final decisions. Build systems that make it easy to change your mind about databases, frameworks, vendors, architecture, and deployment targets -- the cost of change should be proportional to the scope of change.\n\n**Why it works:** Requirements change, vendors get acquired, technologies fall out of favor. If your architecture hard-codes assumptions about any of these, every change becomes a rewrite; flexible architecture treats decisions as configuration, not structure.\n\n**Key insights:**\n- Abstract third-party dependencies behind your own interfaces -- never let vendor APIs leak into business logic\n- The \"forking road\" test: could you switch from Postgres to DynamoDB in a week? If not, you're coupled\n- Metadata-driven systems (config files, feature flags) are more flexible than hard-coded logic\n- YAGNI applies to premature abstraction too -- don't build flexibility you don't need yet\n- Reversibility is not predicting the future; it's not painting yourself into a corner\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Database** | Repository pattern | Business logic calls `repo.save(user)`, not `pg.query(...)` |\n| **External API** | Adapter\u002Fwrapper | `PaymentGateway` interface wraps Stripe; swap to Braintree later |\n| **Feature flags** | Runtime toggles | New checkout flow behind a flag, rollback in seconds |\n\nSee: [references\u002Freversibility.md](references\u002Freversibility.md) when committing to a vendor or framework, or weighing how reversible a decision must be -- per-layer reversibility patterns, the forking-road test, and when NOT to optimize for reversibility.\n\n### 7. Estimation and Knowledge Portfolio\n\n**Core concept:** Learn to estimate reliably by understanding scope, building models, decomposing into components, and assigning ranges. Manage your learning like a financial portfolio: invest regularly, diversify, and rebalance.\n\n**Why it works:** Honest estimation builds trust with stakeholders (\"1-3 weeks\" beats a confidently wrong \"2 weeks\"). A knowledge portfolio keeps you relevant as technologies shift -- the programmer who stops learning stops being effective.\n\n**Key insights:**\n- Ask \"what is this estimate for?\" -- context determines precision (budget planning vs. sprint planning)\n- Use PERT: (Optimistic + 4x Most Likely + Pessimistic) \u002F 6\n- Decompose into components and estimate each; the sum is more accurate than a single guess\n- Keep an estimation log: compare estimates to actuals and calibrate\n- Portfolio rules: invest regularly (learn weekly), diversify beyond your stack, mix safe and speculative bets, learn emerging tech early (buy low)\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Sprint planning** | Range estimates | \"3-5 days\" with confidence level, not a single number |\n| **New technology** | Time-boxed spike | \"2 days evaluating; then I can estimate properly\" |\n| **Learning** | Weekly investment | 1 hour\u002Fweek on a new language, tool, or domain |\n\nSee: [references\u002Festimation-portfolio.md](references\u002Festimation-portfolio.md) when producing an estimate you'll be held to or calibrating past misses -- the PERT and decomposition procedures, an estimation-log calibration loop, and portfolio rebalancing.\n\n## Common Mistakes\n\n| Mistake | Why It Fails | Fix |\n|---------|-------------|-----|\n| DRY-ing similar-looking code that serves different purposes | Couples unrelated concepts; changes to one break the other | Only DRY knowledge, not coincidental code similarity |\n| Skipping tracer bullets, building layer-by-layer | Integration issues surface late; no end-to-end feedback | Build one thin vertical slice first |\n| Ignoring broken windows \"because we'll refactor later\" | Entropy accelerates; later never comes; morale drops | Fix immediately or board up with a tracked ticket |\n| Estimates as single-point commitments | False precision erodes trust when missed | Always give ranges with confidence levels |\n| Making everything \"flexible\" upfront | Over-engineering; abstraction without evidence of need | Add flexibility when you have concrete evidence you'll need it |\n| Removing production assertions \"for performance\" | Bugs assertions would catch now silently corrupt data | Keep critical assertions; benchmark before removing any |\n| Global state \"for convenience\" | Destroys orthogonality; everything coupled to everything | Use dependency injection and explicit parameters |\n\n## Quick Diagnostic\n\n| Question | If No | Action |\n|----------|-------|--------|\n| Can I change the database without touching business logic? | Orthogonality violation | Introduce repository\u002Fadapter pattern |\n| Do I have an end-to-end slice working? | Missing tracer bullet | Build one vertical slice before expanding |\n| Is every business rule defined in exactly one place? | DRY violation | Identify the authoritative source; remove duplicates |\n| Would a new developer call this codebase \"clean\"? | Broken windows present | Schedule a dedicated cleanup sprint |\n| Do my estimates include ranges and confidence levels? | Estimation problem | Switch to PERT or range-based estimates |\n| Can I roll back this deployment in under 5 minutes? | Reversibility gap | Add feature flags and blue-green deploys |\n| Am I learning something new every week? | Knowledge portfolio stagnant | Schedule weekly learning time and track it |\n\n## Further Reading\n\n- [The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition](https:\u002F\u002Fwww.amazon.com\u002FPragmatic-Programmer-journey-mastery-Anniversary\u002Fdp\u002F0135957052?tag=wondelai00-20) by Andrew Hunt and David Thomas\n\n## About the Authors\n\n**Andrew Hunt** and **David Thomas** co-founded the Pragmatic Bookshelf and were among the 17 original authors of the Agile Manifesto. Thomas coined \"DRY\" and \"Code Kata\" and co-authored *Programming Ruby* (the Pickaxe book); Hunt focuses on how teams learn, communicate, and maintain quality. Together they wrote *The Pragmatic Programmer*, one of the most influential software books ever published.\n","# The Pragmatic Programmer Framework\n\nA systems-level approach to software craftsmanship from Hunt & Thomas' \"The Pragmatic Programmer\" (20th Anniversary Edition). Apply these meta-principles when designing systems, reviewing architecture, writing code, or advising on engineering culture -- how to think about software, not just how to write it.\n\n## Core Principle\n\n**Care about your craft.** Software development demands continuous learning, disciplined practice, and personal responsibility -- pragmatic programmers think beyond the immediate problem to context, trade-offs, and long-term consequences. Great software comes from great habits: avoid duplication ruthlessly, keep components orthogonal, and treat every line of code as a living asset that must earn its place. The goal is not perfection -- it is systems that are easy to change, easy to understand, and easy to trust.\n\n## Scoring\n\n**Goal: 10\u002F10.** Score against the seven Quick Diagnostic rows: award ~1.4 points per row answered \"yes\" (7 yes = 10). Then band the result:\n- **9-10**: every principle holds -- DRY knowledge, orthogonal layers, a working tracer slice, contracts at boundaries, no broken windows, reversible vendor\u002FDB choices, ranged estimates.\n- **5-6**: 1-2 violations that cost real change-effort (e.g. business logic coupled to the DB, single-point estimates).\n- **\u003C=3**: pervasive duplication, global state, or accumulated broken windows -- entropy is winning.\n\nAlways state the score, name the failing diagnostic rows, and give the specific fix from the Action column to reach 10\u002F10.\n\n## The Seven Meta-Principles\n\nSeven principles for building software that lasts:\n\n### 1. DRY (Don't Repeat Yourself)\n\n**Core concept:** Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. DRY is about knowledge, not code -- duplicated logic, business rules, or configuration are far more dangerous than duplicated syntax.\n\n**Why it works:** Duplicated knowledge must be changed in multiple places; eventually one gets missed, introducing inconsistency. DRY reduces the surface area for bugs and makes systems easier to change.\n\n**Key insights:**\n- DRY applies to knowledge and intent, not textual similarity -- two identical code blocks serving different business rules are NOT duplication\n- Four types of duplication: imposed (environment forces it), inadvertent (developers don't realize), impatient (too lazy to abstract), inter-developer (multiple people duplicate)\n- Comments that restate the code violate DRY -- explain *why*, not *what*\n- Database schemas, API specs, and documentation duplicate knowledge unless generated from a single source\n- The opposite of DRY is WET: \"Write Everything Twice\" or \"We Enjoy Typing\"\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Config values** | Single source of truth | DB connection in one env file, referenced everywhere |\n| **Validation rules** | Shared schema | One JSON Schema or Zod schema for client and server |\n| **API contracts** | Generate from spec | OpenAPI spec generates types, docs, and client code |\n\nSee: [references\u002Fdry-orthogonality.md](references\u002Fdry-orthogonality.md) when classifying a specific duplication or deciding whether two code blocks are truly the same knowledge -- per-type examples and mitigations for the four duplication types.\n\n### 2. Orthogonality\n\n**Core concept:** Two components are orthogonal if changes in one do not affect the other. Design systems where components are self-contained, independent, and have a single, well-defined purpose.\n\n**Why it works:** Decoupling localizes change -- a fix in one module can't ripple into unrelated ones, so blast radius stays bounded. Change the database layer and the UI should not break; change the auth provider and business logic should not care.\n\n**Key insights:**\n- Ask: \"If I dramatically change the requirements behind a function, how many modules are affected?\" The answer should be one\n- Eliminate effects between unrelated things -- a logging change should never break billing\n- Layered architectures promote orthogonality: presentation, domain logic, data access\n- Avoid global data -- every consumer of global state is coupled to it\n- Frameworks that force you to inherit from their classes reduce orthogonality\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Architecture** | Layered separation | Controller -> Service -> Repository, each replaceable |\n| **Dependencies** | Dependency injection | Pass a `Notifier` interface, not a `SlackClient` concrete class |\n| **Testing** | Isolated unit tests | Test business logic without database, network, or filesystem |\n\nSee: [references\u002Fdry-orthogonality.md](references\u002Fdry-orthogonality.md) when measuring coupling or refactoring toward decoupled layers -- the change-impact and stranger tests, layered-architecture diagram, and the helicopter analogy.\n\n### 3. Tracer Bullets and Prototypes\n\n**Core concept:** Tracer bullets are end-to-end implementations connecting all layers of the system with minimal functionality. Unlike prototypes (which are throwaway), tracer bullet code is production code -- thin but real.\n\n**Why it works:** Tracer bullets give immediate end-to-end feedback before you invest in filling out every feature. Users see something real, developers have a framework to build on, and integration issues surface early.\n\n**Key insights:**\n- Tracer bullet: thin but complete path through the system (UI -> API -> DB) -- you keep it\n- Prototype: focused exploration of a single risky aspect -- you throw it away\n- Use tracer bullets when \"shooting in the dark\" -- vague requirements, unproven architecture\n- If a tracer misses, adjust and fire again -- the cost of iteration is low\n- Label prototypes clearly as throwaway -- never let one become production code\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **New project** | Vertical slice | One feature end-to-end: button -> API -> DB -> response |\n| **Uncertain tech** | Spike prototype | Test WebSocket performance before committing |\n| **Microservice** | Walking skeleton | Hello-world service through the full CI\u002FCD pipeline |\n\nSee: [references\u002Ftracer-bullets.md](references\u002Ftracer-bullets.md) when deciding tracer vs. prototype on a new project or building a walking skeleton -- the shooting-in-the-dark decision, iteration loop, and common pitfalls.\n\n### 4. Design by Contract and Assertive Programming\n\n**Core concept:** Define and enforce the rights and responsibilities of software modules through preconditions (what must be true before), postconditions (what is guaranteed after), and invariants (what is always true). When a contract is violated, fail immediately and loudly.\n\n**Why it works:** Contracts make assumptions explicit. Instead of silently corrupting data or limping along in an invalid state, the system crashes at the point of the problem -- dead programs tell no lies.\n\n**Key insights:**\n- Preconditions: caller's responsibility -- \"I accept only positive integers\"\n- Postconditions: routine's guarantee -- \"I will return a sorted list\"\n- Invariants: always true -- \"Account balance never goes negative\"\n- Crash early: a dead program does far less damage than a crippled one\n- Use assertions for things that should never happen; error handling for things that might\n- In dynamic languages, implement contracts through runtime checks and guard clauses\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Function entry** | Precondition guard | `assert age >= 0, \"Age cannot be negative\"` at function start |\n| **Class state** | Invariant validation | `validate!` called after every state mutation |\n| **API boundary** | Schema validation | Validate request body against schema before processing |\n\nSee: [references\u002Fcontracts-assertions.md](references\u002Fcontracts-assertions.md) when adding contracts to a routine or deciding assertion vs. error handling -- worked pre\u002Fpost\u002Finvariant patterns, dynamic-language guard clauses, and the assertions-vs-error-handling boundary.\n\n### 5. The Broken Window Theory\n\n**Core concept:** One broken window -- a badly designed piece of code, a poor management decision, a hack that \"we'll fix later\" -- starts the rot. Once a system shows neglect, entropy accelerates and discipline collapses.\n\n**Why it works:** Psychology. When code is clean, developers feel social pressure to keep it that way; when code is already messy, the threshold for adding more mess drops to zero. Quality is a team habit, not an individual heroic effort.\n\n**Key insights:**\n- Don't leave broken windows (bad designs, wrong decisions, poor code) unrepaired\n- If you can't fix it now, board it up: a TODO with a ticket, a disabled feature, a stub\n- Be a catalyst for change: show people a working glimpse of the future (stone soup)\n- Watch for slow degradation (boiled frog) -- monitor tech debt metrics over time\n- The first hack is the most expensive because it gives permission for all subsequent hacks\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Legacy code** | Board up windows | Wrap bad code in a clean interface before adding features |\n| **Code review** | Zero-tolerance for new debt | Reject PRs adding `\u002F\u002F TODO: fix later` without a ticket |\n| **Tech debt** | Debt budget | Allocate 20% of each sprint to fixing broken windows |\n\nSee: [references\u002Fbroken-windows.md](references\u002Fbroken-windows.md) when a team is normalizing neglect or you need to drive a turnaround -- repair strategies, the stone-soup catalyst play, and building a culture of quality.\n\n### 6. Reversibility and Flexibility\n\n**Core concept:** There are no final decisions. Build systems that make it easy to change your mind about databases, frameworks, vendors, architecture, and deployment targets -- the cost of change should be proportional to the scope of change.\n\n**Why it works:** Requirements change, vendors get acquired, technologies fall out of favor. If your architecture hard-codes assumptions about any of these, every change becomes a rewrite; flexible architecture treats decisions as configuration, not structure.\n\n**Key insights:**\n- Abstract third-party dependencies behind your own interfaces -- never let vendor APIs leak into business logic\n- The \"forking road\" test: could you switch from Postgres to DynamoDB in a week? If not, you're coupled\n- Metadata-driven systems (config files, feature flags) are more flexible than hard-coded logic\n- YAGNI applies to premature abstraction too -- don't build flexibility you don't need yet\n- Reversibility is not predicting the future; it's not painting yourself into a corner\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Database** | Repository pattern | Business logic calls `repo.save(user)`, not `pg.query(...)` |\n| **External API** | Adapter\u002Fwrapper | `PaymentGateway` interface wraps Stripe; swap to Braintree later |\n| **Feature flags** | Runtime toggles | New checkout flow behind a flag, rollback in seconds |\n\nSee: [references\u002Freversibility.md](references\u002Freversibility.md) when committing to a vendor or framework, or weighing how reversible a decision must be -- per-layer reversibility patterns, the forking-road test, and when NOT to optimize for reversibility.\n\n### 7. Estimation and Knowledge Portfolio\n\n**Core concept:** Learn to estimate reliably by understanding scope, building models, decomposing into components, and assigning ranges. Manage your learning like a financial portfolio: invest regularly, diversify, and rebalance.\n\n**Why it works:** Honest estimation builds trust with stakeholders (\"1-3 weeks\" beats a confidently wrong \"2 weeks\"). A knowledge portfolio keeps you relevant as technologies shift -- the programmer who stops learning stops being effective.\n\n**Key insights:**\n- Ask \"what is this estimate for?\" -- context determines precision (budget planning vs. sprint planning)\n- Use PERT: (Optimistic + 4x Most Likely + Pessimistic) \u002F 6\n- Decompose into components and estimate each; the sum is more accurate than a single guess\n- Keep an estimation log: compare estimates to actuals and calibrate\n- Portfolio rules: invest regularly (learn weekly), diversify beyond your stack, mix safe and speculative bets, learn emerging tech early (buy low)\n\n**Code applications:**\n\n| Context | Pattern | Example |\n|---------|---------|---------|\n| **Sprint planning** | Range estimates | \"3-5 days\" with confidence level, not a single number |\n| **New technology** | Time-boxed spike | \"2 days evaluating; then I can estimate properly\" |\n| **Learning** | Weekly investment | 1 hour\u002Fweek on a new language, tool, or domain |\n\nSee: [references\u002Festimation-portfolio.md](references\u002Festimation-portfolio.md) when producing an estimate you'll be held to or calibrating past misses -- the PERT and decomposition procedures, an estimation-log calibration loop, and portfolio rebalancing.\n\n## Common Mistakes\n\n| Mistake | Why It Fails | Fix |\n|---------|-------------|-----|\n| DRY-ing similar-looking code that serves different purposes | Couples unrelated concepts; changes to one break the other | Only DRY knowledge, not coincidental code similarity |\n| Skipping tracer bullets, building layer-by-layer | Integration issues surface late; no end-to-end feedback | Build one thin vertical slice first |\n| Ignoring broken windows \"because we'll refactor later\" | Entropy accelerates; later never comes; morale drops | Fix immediately or board up with a tracked ticket |\n| Estimates as single-point commitments | False precision erodes trust when missed | Always give ranges with confidence levels |\n| Making everything \"flexible\" upfront | Over-engineering; abstraction without evidence of need | Add flexibility when you have concrete evidence you'll need it |\n| Removing production assertions \"for performance\" | Bugs assertions would catch now silently corrupt data | Keep critical assertions; benchmark before removing any |\n| Global state \"for convenience\" | Destroys orthogonality; everything coupled to everything | Use dependency injection and explicit parameters |\n\n## Quick Diagnostic\n\n| Question | If No | Action |\n|----------|-------|--------|\n| Can I change the database without touching business logic? | Orthogonality violation | Introduce repository\u002Fadapter pattern |\n| Do I have an end-to-end slice working? | Missing tracer bullet | Build one vertical slice before expanding |\n| Is every business rule defined in exactly one place? | DRY violation | Identify the authoritative source; remove duplicates |\n| Would a new developer call this codebase \"clean\"? | Broken windows present | Schedule a dedicated cleanup sprint |\n| Do my estimates include ranges and confidence levels? | Estimation problem | Switch to PERT or range-based estimates |\n| Can I roll back this deployment in under 5 minutes? | Reversibility gap | Add feature flags and blue-green deploys |\n| Am I learning something new every week? | Knowledge portfolio stagnant | Schedule weekly learning time and track it |\n\n## Further Reading\n\n- [The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition](https:\u002F\u002Fwww.amazon.com\u002FPragmatic-Programmer-journey-mastery-Anniversary\u002Fdp\u002F0135957052?tag=wondelai00-20) by Andrew Hunt and David Thomas\n\n## About the Authors\n\n**Andrew Hunt** and **David Thomas** co-founded the Pragmatic Bookshelf and were among the 17 original authors of the Agile Manifesto. Thomas coined \"DRY\" and \"Code Kata\" and co-authored *Programming Ruby* (the Pickaxe book); Hunt focuses on how teams learn, communicate, and maintain quality. Together they wrote *The Pragmatic Programmer*, one of the most influential software books ever published.\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"wondelai","1.4.0","main","7d9c45c72ac89da53a28423808dabd6dc0be6795","skills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx","https:\u002F\u002Fgithub.com\u002Fsung1-labs","Building open-source tools for AI-assisted software development, spec-driven engineering, and reliable developer workflows.","2026-09-07 02:51:20",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add sung1-labs\u002Fsddx --skill pragmatic-programmer",{"tool":40,"command":41},"bunx","bunx skills add sung1-labs\u002Fsddx --skill pragmatic-programmer",{"tool":43,"command":44},"pnpm","pnpm dlx skills add sung1-labs\u002Fsddx --skill pragmatic-programmer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002FSKILL.md",true,[48,54,58,62,66,70],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fbroken-windows.md","REFERENCE","参考文档",11791,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002Freferences\u002Fbroken-windows.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fcontracts-assertions.md",13596,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002Freferences\u002Fcontracts-assertions.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fdry-orthogonality.md",11207,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002Freferences\u002Fdry-orthogonality.md",{"path":63,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Festimation-portfolio.md",13975,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002Freferences\u002Festimation-portfolio.md",{"path":67,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Freversibility.md",14232,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002Freferences\u002Freversibility.md",{"path":71,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Ftracer-bullets.md",12129,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fai-skills\u002Fsddx-ai-pragmatic-programmer\u002Freferences\u002Ftracer-bullets.md",[75,82,89,96,103,110],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7C8TCN2HNT036445CS1VBHT","sddx-verify","Verify the complete SDDx change against its specifications, architecture, implementation, tests, security, operations, and deployment expectations.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-verify\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7C8T9FQKTSN971MP6RSV0GK","sddx-quick","Handle a small, bounded change with minimal durable artifacts while preserving verification and automatic escalation when scope grows.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-quick\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7C8T6C21FE8ZX8XDSJ5VJ5R","sddx-propose","Turn a resolved SDDx exploration into durable proposal, requirements, design, tasks, and optional RFC artifacts.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-propose\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7C8T2QDGTK9PPG4A3JXXS28","sddx-explore","Explore a change before implementation, resolve the applicable product, UX, architecture, security, testing, deployment, and operational questions, and recommend the next SDDx workflow.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-explore\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7C8SZ9GTETBRKEXT43EZ9G9","sddx-debug","Diagnose and fix a defect through reproduction, evidence-based hypotheses, a minimal fix, regression coverage, and verification.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-debug\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7C8SW14B7XG3TSQGGWZ0ZCH","sddx-archive","Complete a verified SDDx change, preserve its durable record, synchronize specifications, and recommend the next workflow.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-archive\u002FSKILL.md",[],[]]