[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E7FCYZ3BAEYW48VY76BCPE":3,"skill-same:01M7E7FCYZ3BAEYW48VY76BCPE":47},{"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":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":46},"01M7E7FCYZ3BAEYW48VY76BCPE","principle-encode-lessons-in-structure",null,"Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.","giuseppecrj\u002Fpi-herdr-pstack","giuseppecrj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5714678?v=4","01M7E7A7DZHS53J4N29EW0XYZX","Giuseppe Rodriguez","01M7E7A7EHHKRDDBPPFPKNHFDY",3,"MIT","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fprinciple-encode-lessons-in-structure\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: principle-encode-lessons-in-structure\ndescription: \"Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.\"\ndisable-model-invocation: true\n---\n\n# Encode Lessons in Structure\n\nEncode recurring fixes in mechanisms (tools, code, metadata, automation) instead of textual instructions. Every error, human correction, and unexpected outcome is a learning signal. Capture it, route it, and close the loop.\n\n**Why:** Textual instructions are easy to miss. They require the reader to notice, remember, and comply. Structural mechanisms (lint rules, metadata flags, runtime checks, automation scripts) enforce the rule without cooperation.\n\n**Pattern:**\nWhen you catch yourself writing the same instruction a second time:\n1. Ask: can this be a lint rule, a metadata flag, a runtime check, or a script?\n2. If yes, encode it. Delete the instruction\n3. If no (requires judgment), make the instruction more prominent and add an example of the failure mode\n\n**Pick the strongest mechanism.** When more than one mechanism would work, choose the strongest the situation allows (an unrepresentable state that cannot compile, then a lint or banned API that fails CI, then a canonical helper, then a runtime check), because agents copy whatever the surrounding code already does and a weaker guard becomes the next template.\n\n**Corollary:** If the fix is structural, only use the structural fix. The instruction is the symptom.\n\n**Feedback loop:**\n- **Capture every correction.** When the human intervenes or tests fail, decide if it's a one-off or a pattern.\n- **Route to the right layer.** One-off -> brain note. Recurring fix -> skill or lint rule. Systemic issue -> principle.\n- **Close the loop.** Don't just record. Apply now or create a concrete todo.\n\n**Anti-patterns:**\n- Acknowledging without recording (\"I'll keep that in mind\" does not persist)\n- Recording without routing (a brain note about a lint rule that should exist is wasted unless the lint rule gets implemented)\n- Fixing without generalizing (fixing one instance while leaving the recurring pattern intact)\n","# Encode Lessons in Structure\n\nEncode recurring fixes in mechanisms (tools, code, metadata, automation) instead of textual instructions. Every error, human correction, and unexpected outcome is a learning signal. Capture it, route it, and close the loop.\n\n**Why:** Textual instructions are easy to miss. They require the reader to notice, remember, and comply. Structural mechanisms (lint rules, metadata flags, runtime checks, automation scripts) enforce the rule without cooperation.\n\n**Pattern:**\nWhen you catch yourself writing the same instruction a second time:\n1. Ask: can this be a lint rule, a metadata flag, a runtime check, or a script?\n2. If yes, encode it. Delete the instruction\n3. If no (requires judgment), make the instruction more prominent and add an example of the failure mode\n\n**Pick the strongest mechanism.** When more than one mechanism would work, choose the strongest the situation allows (an unrepresentable state that cannot compile, then a lint or banned API that fails CI, then a canonical helper, then a runtime check), because agents copy whatever the surrounding code already does and a weaker guard becomes the next template.\n\n**Corollary:** If the fix is structural, only use the structural fix. The instruction is the symptom.\n\n**Feedback loop:**\n- **Capture every correction.** When the human intervenes or tests fail, decide if it's a one-off or a pattern.\n- **Route to the right layer.** One-off -> brain note. Recurring fix -> skill or lint rule. Systemic issue -> principle.\n- **Close the loop.** Don't just record. Apply now or create a concrete todo.\n\n**Anti-patterns:**\n- Acknowledging without recording (\"I'll keep that in mind\" does not persist)\n- Recording without routing (a brain note about a lint rule that should exist is wasted unless the lint rule gets implemented)\n- Fixing without generalizing (fixing one instance while leaving the recurring pattern intact)\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","43aca90238855614654b0222294818ec6ad2e846","skills\u002Fpstack\u002Fprinciple-encode-lessons-in-structure",0,"https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj","giuseppecrj.com","Building agent infrastructure, protocol systems, and real-time product software.","2026-11-13 09:05:00",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":24},[36,39,42],{"tool":37,"command":38},"npx","npx skills add giuseppecrj\u002Fpi-herdr-pstack --skill principle-encode-lessons-in-structure",{"tool":40,"command":41},"bunx","bunx skills add giuseppecrj\u002Fpi-herdr-pstack --skill principle-encode-lessons-in-structure",{"tool":43,"command":44},"pnpm","pnpm dlx skills add giuseppecrj\u002Fpi-herdr-pstack --skill principle-encode-lessons-in-structure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fprinciple-encode-lessons-in-structure\u002FSKILL.md",[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7E7JPTA02FFGS96SQYQ678W","poteto-mode","Test fixture. A different skill that reuses the poteto-mode name, to check shadowing diagnostics.","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fshadow-skills\u002Fpoteto-mode\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7E7JGE95NH51A731ZTRWECS","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7E7JEEJ2303D2M1897CCR8N","unslop","Cut AI tells from any writing. Must always apply.","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Funslop\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7E7JCM06BKK08YM1HZ7MW67","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Ftypescript-best-practices\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7E7J7SHT7XMV128283BE35W","technical-writing","Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for \u002Fskill:technical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Ftechnical-writing\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7E7J525CXJN2FKSN7HTW2X0","swarm","Fan out N parallel workers, drain them, and return one report. Use for \u002Fswarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.","https:\u002F\u002Fgithub.com\u002Fgiuseppecrj\u002Fpi-herdr-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fswarm\u002FSKILL.md",[],[]]