[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M752T1BRXVGFE71DH813Z9JV":3,"skill-same:01M752T1BRXVGFE71DH813Z9JV":42},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":17,"linkOnly":18,"markdownContent":19,"markdownBody":19,"frontMatter":20,"refName":21,"commitSha":22,"skillDirectory":23,"forksCount":24,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":27,"install":28,"resources":41},"01M752T1BRXVGFE71DH813Z9JV","sd-retro-lessons",null,"developzoneio\u002Fspecwright","developzoneio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F288244965?v=4","01M752S4GQXBCH6H67H28M9HTN","01M752S4HXZ73BTCHG2K1VCYQA",10,"MIT","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Fskills\u002Fsd-retro-lessons\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"# sd-retro-lessons\n\nLesson-extraction discipline for specwright. Turns retro prose into privacy-safe, reusable\none-line rules that transfer to a codebase the author has never seen.\n\nThis skill is the authority on the tag enum, the lesson record shape, and the abstraction\nrules. `scripts\u002Fvalidate-lessons.ps1` \u002F `.sh` enforce the mechanical half; everything the\nvalidator cannot see is your job.\n\n---\n\n## Why a lesson is not a retro note\n\nA retro note records what happened *here*. A lesson records what should be done *anywhere*.\n\n```\nretro note   The League index copied CASESENSITIVE from euro-sportsbook, but the shared\n             RedisQueryBuilder emits lowercase, so every dated query returned empty.\n\nlesson       When mirroring a sibling repository's implementation, verify the local shared\n             helper produces the same casing before copying an index or query attribute.\n```\n\nSame insight. The second one carries no identifiers, transfers to any stack, and can be\nshared outside the org. Producing the second from the first is the whole skill.\n\n---\n\n## The tag enum\n\nTen tags, derived from a mined corpus of real retros - not authored up front. Every tag\nbelow traces to at least one observed occurrence.\n\n| Tag | Fires when |\n|---|---|\n| `sibling-repo-assumption` | Behaviour copied from a reference or sibling repo without verifying the local equivalent. |\n| `missed-context` | The spec missed something that impact analysis, review, or execution later surfaced. |\n| `baseline-attribution` | A pre-existing failure was blamed on, or dismissed because of, the current change without baselining. |\n| `tooling-surprise` | A tool did something correct but unexpected that altered the working state. |\n| `gate-friction` | A gate was waived, deferred, or satisfied by exception rather than met. |\n| `config-drift` | Project configuration no longer matches the repository it describes. |\n| `test-fragility` | A test was written coupled to names, literals, or reflection, knowingly or not. |\n| `test-gap` | No test surface existed for the affected area and one had to be created mid-work. |\n| `precedent-conflict` | A constitution rule conflicted with an established pattern already in the codebase. |\n| `scope-discipline` | An in-scope-looking fix was correctly declined, or incorrectly absorbed. |\n\n**The enum is capped at 12.** Two slots are deliberately free. Adding a tag requires a PR\nthat cites the retro which produced it. When a candidate lesson fits two existing tags,\npick the more specific one - do not invent a third.\n\n**Retired:** `pattern-violation`. Every candidate instance resolved into either\n`sibling-repo-assumption` or `precedent-conflict`. A tag that overlaps two others gets\napplied inconsistently and poisons selection.\n\n---\n\n## Record shape\n\nOne line. Exactly this grammar:\n\n```\n- [tag] severity\u002Fscope: Rule sentence.\n```\n\n- `tag` - from the enum above, lowercase kebab.\n- `severity` - `high` | `medium` | `low`. High means it would have shipped a defect or lost\n  a day. Low means it cost minutes.\n- `scope` - `feature` | `bug` | `refactor` | `perf` | `rca` | `port` | `all`. This is the selector\n  a future run filters on, so `all` must be earned: use it only when the rule genuinely does not\n  depend on the workflow. A `port`-scoped lesson is recorded but not yet selected by\n  `subagent-retro` - the hook's in-progress-spec detection does not recognize the `PORT-` prefix\n  (see `docs\u002Ftroubleshooting.md`).\n- `Rule sentence` - one sentence, imperative, **120 characters maximum**.\n\nAfter aggregation a repeat count may be appended - ` (3)`. Authors never write it.\n\n```\n- [sibling-repo-assumption] high\u002Ffeature: When mirroring a sibling repository, verify the local shared helper matches before copying an attribute.\n- [baseline-attribution] medium\u002Fall: Confirm pre-existing failures against a clean baseline before attributing or dismissing them.\n- [gate-friction] medium\u002Frefactor: When waiving a coverage gate, record measured coverage, residual risk, and what would satisfy it later.\n```\n\n---\n\n## Privacy rules\n\n`.specs\u002F_lessons\u002Flessons.md` is designed to be shared outside the organisation as-is. The\nrule sentence must therefore contain **zero identifiers**.\n\nForbidden in a rule sentence:\n\n- Path separators (`\u002F`, `\\`) and file extensions.\n- Backticks - if you need one, the sentence is still describing code.\n- Line citations (`:84`).\n- PascalCase or camelCase identifiers - class, method, variable, and type names.\n- snake_case identifiers.\n- Repository, product, team, customer, or person names.\n\n\u003C!-- contract-lint: allow CL401 - naming the allowlist's own example entries, not assuming this project's stack -->\nTechnology proper nouns that happen to be PascalCase (PowerShell, TypeScript, PostgreSQL,\nand similar) are allowed via a small allowlist in the validator. Extending that allowlist\ntakes a PR - and usually means the lesson is less portable than you think.\n\n**The validator is a lint, not a guarantee.** It cannot see \"the payment team's nightly\nreconciliation job\" written in plain prose. That leaks just as badly as a class name. You\ncarry that part.\n\n---\n\n## Extraction procedure\n\n1. Read the retro's **Surprises**, **Deferred follow-ups**, and **Constitution exceptions**\n   sections first. That is where lessons concentrate.\n2. Skip auto-generated content. A retro line matching `Status: X -> Y. Reason: ...` was\n   written by `\u002Fsd:spec status` or `\u002Fsd:release`. It carries no lesson. A retro consisting\n   only of such lines yields zero lessons - that is a correct outcome, not a failure.\n3. For each candidate, ask: **would this have helped someone on a different codebase?**\n   If no, it is a note, not a lesson. Drop it.\n4. Strip identifiers. Restate as an imperative rule. Re-read it as a stranger.\n5. Tag, rate severity, pick the narrowest true scope.\n6. Run the validator before proposing the line.\n\n---\n\n## Anti-patterns\n\n- **Tagging without abstracting.** Copying the retro sentence and prefixing a tag. The\n  result leaks, and it teaches nothing outside this repo.\n- **Restating the obvious.** \"Write tests before merging\" is not a lesson, it is a slogan.\n  A lesson names a specific trap someone actually fell into.\n- **`scope: all` by default.** It defeats selection; every run gets every lesson.\n- **One lesson per task.** A spec with twelve tasks does not produce twelve lessons. Most\n  specs produce zero to two. Zero is a normal, healthy outcome.\n- **Inventing a tag** because none of the ten felt perfect. Pick the closest, or open a PR.\n- **Escalating on repeat.** A lesson that reappears gets a count, never a higher severity.\n  Severity describes the trap; frequency is a separate axis and is already recorded.\n",{},"main","cb6a2aef549bb625b9ba1869d220d40938e83c18","skills\u002Fsd-retro-lessons",0,"https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio","2026-11-11 17:12:43",{"source":7,"skillName":5,"commands":29,"prompt":39,"zipAvailable":40},[30,33,36],{"tool":31,"command":32},"npx","npx skills add developzoneio\u002Fspecwright --skill sd-retro-lessons",{"tool":34,"command":35},"bunx","bunx skills add developzoneio\u002Fspecwright --skill sd-retro-lessons",{"tool":37,"command":38},"pnpm","pnpm dlx skills add developzoneio\u002Fspecwright --skill sd-retro-lessons","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Fskills\u002Fsd-retro-lessons\u002FSKILL.md",true,[],[43,49,54,60,65,70],{"skillNo":44,"name":45,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":46,"categories":47,"keywords":48,"publishedAt":17},"01M752V2C4FNMKBZTZETKKN70B","sd-model-escalation","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Ftests\u002Fcontract-lint\u002Ffixtures\u002Ffp-cl605-alias-list\u002Foverlay\u002Fskills\u002Fsd-model-escalation\u002FSKILL.md",[],[],{"skillNo":50,"name":45,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":17},"01M752V0C3S0BHSXZ4JM3B7MF2","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Ftests\u002Fcontract-lint\u002Ffixtures\u002Ffp-cl601-allow-comment\u002Foverlay\u002Fskills\u002Fsd-model-escalation\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":17},"01M752TYQZVASA2BTDRZB4N8W6","sd-demo-guard","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Ftests\u002Fcontract-lint\u002Ffixtures\u002Ffp-cl009-phrase-outside-phase0\u002Foverlay\u002Fskills\u002Fsd-demo-guard\u002FSKILL.md",[],[],{"skillNo":61,"name":45,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":17},"01M752TXBFQHK7NCDTZEBHZRFN","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Ftests\u002Fcontract-lint\u002Ffixtures\u002Fcl605-command-restates-ladder\u002Foverlay\u002Fskills\u002Fsd-model-escalation\u002FSKILL.md",[],[],{"skillNo":66,"name":45,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":17},"01M752TVDG89BJRTGFET80RCK2","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Ftests\u002Fcontract-lint\u002Ffixtures\u002Fcl604-row-skips-rung\u002Foverlay\u002Fskills\u002Fsd-model-escalation\u002FSKILL.md",[],[],{"skillNo":71,"name":45,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":17},"01M752TT6SD0SSK6Z0GQ4HM68P","https:\u002F\u002Fgithub.com\u002Fdevelopzoneio\u002Fspecwright\u002Fblob\u002Fmain\u002Ftests\u002Fcontract-lint\u002Ffixtures\u002Fcl603-full-model-id-in-row\u002Foverlay\u002Fskills\u002Fsd-model-escalation\u002FSKILL.md",[],[]]