[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71NR9V1M7BKGR7GE1QEMTGH":3,"skill-same:01M71NR9V1M7BKGR7GE1QEMTGH":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":13,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M71NR9V1M7BKGR7GE1QEMTGH","improve-codebase-architecture",null,"Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable. Surfaces deepening opportunities — turning shallow modules into deep ones.","max-kharena\u002Fnous","max-kharena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F249811097?v=4","01M71NQQ2DRKPEV4AF9J318N31","01M71NQQ303XV5QX5DHCZKM41V",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"improve codebase architecture","codebase","improve","architecture","modules","deep","refactoring","find","surfaces","deepening","more","use","when","user","make","consolidate","2026-11-10 10:56:23",false,"---\nname: improve-codebase-architecture\ndescription: Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable. Surfaces deepening opportunities — turning shallow modules into deep ones.\nversion: 0.1.0\ntype: architecture\nrisk: medium\n---\n\n# Improve Codebase Architecture\n\nSurface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.\n\n## Glossary\n\nUse these terms exactly in every suggestion. Consistent language is the point — don't drift into \"component,\" \"service,\" \"API,\" or \"boundary.\" Full definitions in [LANGUAGE.md](LANGUAGE.md).\n\n- **Module** — anything with an interface and an implementation (function, class, package, slice).\n- **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.\n- **Implementation** — the code inside.\n- **Depth** — leverage at the interface: a lot of behavior behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.\n- **Seam** — where an interface lives; a place behavior can be altered without editing in place. (Use this, not \"boundary.\")\n- **Adapter** — a concrete thing satisfying an interface at a seam.\n- **Leverage** — what callers get from depth.\n- **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.\n\nKey principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):\n\n- **Deletion test:** imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.\n- **The interface is the test surface.**\n- **One adapter = hypothetical seam. Two adapters = real seam.**\n\nThis skill is _informed_ by the project's domain model — `CONTEXT.md` and any `docs\u002Fadr\u002F`. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate. See [CONTEXT-FORMAT.md](..\u002Fdomain-model\u002FCONTEXT-FORMAT.md) and [ADR-FORMAT.md](..\u002Fdomain-model\u002FADR-FORMAT.md).\n\n## Workflow\n\n### 1. Explore\n\nRead existing documentation first:\n\n- `CONTEXT.md` (or `CONTEXT-MAP.md` + each `CONTEXT.md` in a multi-context repo)\n- Relevant ADRs in `docs\u002Fadr\u002F` (and any context-scoped `docs\u002Fadr\u002F` directories)\n\nIf any of these files don't exist, proceed silently — don't flag their absence or suggest creating them upfront.\n\nThen walk the codebase using the host's exploration primitive. Don't follow rigid heuristics — explore organically and note where you experience friction:\n\n- Where does understanding one concept require bouncing between many small modules?\n- Where are modules **shallow** — interface nearly as complex as the implementation?\n- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?\n- Where do tightly-coupled modules leak across their seams?\n- Which parts of the codebase are untested, or hard to test through their current interface?\n\nApply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A *\"yes, concentrates\"* is the signal you want.\n\n### 2. Present candidates\n\nPresent a numbered list of deepening opportunities. For each candidate:\n\n- **Files** — which files \u002F modules are involved\n- **Problem** — why the current architecture is causing friction\n- **Solution** — plain English description of what would change\n- **Benefits** — explained in terms of locality and leverage, and in how tests would improve\n\n**Use `CONTEXT.md` vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.** If `CONTEXT.md` defines \"Order,\" talk about *\"the Order intake module\"* — not *\"the FooBarHandler,\"* and not *\"the Order service.\"*\n\n**ADR conflicts:** if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting. Mark it clearly (e.g. *\"contradicts ADR-0007 — but worth reopening because…\"*). Don't list every theoretical refactor an ADR forbids.\n\nDo NOT propose interfaces yet. Ask the user: *\"Which of these would you like to explore?\"*\n\n### 3. Grilling loop\n\nOnce the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nSide effects happen inline as decisions crystallize:\n\n- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `domain-model` (see [CONTEXT-FORMAT.md](..\u002Fdomain-model\u002FCONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.\n- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.\n- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: *\"Want me to record this as an ADR so future architecture reviews don't re-suggest it?\"* Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons (*\"not worth it right now\"*) and self-evident ones. See [ADR-FORMAT.md](..\u002Fdomain-model\u002FADR-FORMAT.md).\n- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md) — the parallel-subagent design pattern. Equivalent to the `design-an-interface` skill applied to the chosen candidate.\n","# Improve Codebase Architecture\n\nSurface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.\n\n## Glossary\n\nUse these terms exactly in every suggestion. Consistent language is the point — don't drift into \"component,\" \"service,\" \"API,\" or \"boundary.\" Full definitions in [LANGUAGE.md](LANGUAGE.md).\n\n- **Module** — anything with an interface and an implementation (function, class, package, slice).\n- **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.\n- **Implementation** — the code inside.\n- **Depth** — leverage at the interface: a lot of behavior behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.\n- **Seam** — where an interface lives; a place behavior can be altered without editing in place. (Use this, not \"boundary.\")\n- **Adapter** — a concrete thing satisfying an interface at a seam.\n- **Leverage** — what callers get from depth.\n- **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.\n\nKey principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):\n\n- **Deletion test:** imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.\n- **The interface is the test surface.**\n- **One adapter = hypothetical seam. Two adapters = real seam.**\n\nThis skill is _informed_ by the project's domain model — `CONTEXT.md` and any `docs\u002Fadr\u002F`. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate. See [CONTEXT-FORMAT.md](..\u002Fdomain-model\u002FCONTEXT-FORMAT.md) and [ADR-FORMAT.md](..\u002Fdomain-model\u002FADR-FORMAT.md).\n\n## Workflow\n\n### 1. Explore\n\nRead existing documentation first:\n\n- `CONTEXT.md` (or `CONTEXT-MAP.md` + each `CONTEXT.md` in a multi-context repo)\n- Relevant ADRs in `docs\u002Fadr\u002F` (and any context-scoped `docs\u002Fadr\u002F` directories)\n\nIf any of these files don't exist, proceed silently — don't flag their absence or suggest creating them upfront.\n\nThen walk the codebase using the host's exploration primitive. Don't follow rigid heuristics — explore organically and note where you experience friction:\n\n- Where does understanding one concept require bouncing between many small modules?\n- Where are modules **shallow** — interface nearly as complex as the implementation?\n- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?\n- Where do tightly-coupled modules leak across their seams?\n- Which parts of the codebase are untested, or hard to test through their current interface?\n\nApply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A *\"yes, concentrates\"* is the signal you want.\n\n### 2. Present candidates\n\nPresent a numbered list of deepening opportunities. For each candidate:\n\n- **Files** — which files \u002F modules are involved\n- **Problem** — why the current architecture is causing friction\n- **Solution** — plain English description of what would change\n- **Benefits** — explained in terms of locality and leverage, and in how tests would improve\n\n**Use `CONTEXT.md` vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.** If `CONTEXT.md` defines \"Order,\" talk about *\"the Order intake module\"* — not *\"the FooBarHandler,\"* and not *\"the Order service.\"*\n\n**ADR conflicts:** if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting. Mark it clearly (e.g. *\"contradicts ADR-0007 — but worth reopening because…\"*). Don't list every theoretical refactor an ADR forbids.\n\nDo NOT propose interfaces yet. Ask the user: *\"Which of these would you like to explore?\"*\n\n### 3. Grilling loop\n\nOnce the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nSide effects happen inline as decisions crystallize:\n\n- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `domain-model` (see [CONTEXT-FORMAT.md](..\u002Fdomain-model\u002FCONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.\n- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.\n- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: *\"Want me to record this as an ADR so future architecture reviews don't re-suggest it?\"* Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons (*\"not worth it right now\"*) and self-evident ones. See [ADR-FORMAT.md](..\u002Fdomain-model\u002FADR-FORMAT.md).\n- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md) — the parallel-subagent design pattern. Equivalent to the `design-an-interface` skill applied to the chosen candidate.\n",{"name":5,"risk":39,"type":21,"version":40,"description":7},"medium","0.1.0","main","05ddbcce9e3471b880e9edc7c63e4bdd40359861","skills\u002Fimprove-codebase-architecture","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous","https:\u002F\u002Fgithub.com\u002Fmax-kharena","2026-04-28 22:54:20",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add max-kharena\u002Fnous --skill improve-codebase-architecture",{"tool":53,"command":54},"bunx","bunx skills add max-kharena\u002Fnous --skill improve-codebase-architecture",{"tool":56,"command":57},"pnpm","pnpm dlx skills add max-kharena\u002Fnous --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",true,[61,67,71],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"DEEPENING.md","REFERENCE","参考文档",2568,"https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FDEEPENING.md",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"INTERFACE-DESIGN.md",2877,"https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FINTERFACE-DESIGN.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"LANGUAGE.md",3801,"https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FLANGUAGE.md",[76,97,114,130,153,171],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":34},"01M71NSZ170Z45TAP4CWY74YH3","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when the user wants to create, write, or build a new skill.","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[],[83,84,85,86,87,88,89,90,31,91,92,93,94,29,30,95,96],"write a skill","write","a skill","create","structure","build","new skill","with","new agent","resources","progressive","new","progressive disclosure","Meta",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":34},"01M71NSX1D1C2MK3NJ42E1GQ47","verification-before-completion","Use when about to claim work is complete, fixed, passing, ready, merged, shippable, reviewed, or verified.","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[104,105,29,30,106,107,108,109,110,111,112,113],"verification","verification before completion","verified","claim","complete","quality","about","high","work","ready",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":34},"01M71NSVRTWNA5RYBRRRBQ4830","using-nous","Use when a request needs NOUS command routing or personality-driven planning.","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fusing-nous\u002FSKILL.md",[],[121,122,123,30,29,124,125,126,127,128,129],"using nous","personality","driven","command routing","request","planning","command","routing","router",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":34},"01M71NST398KW57VNX72Z35MC2","using-git-worktrees","Use when NOUS execution needs isolated implementation branches, phase worktrees, parallel worktrees, or safe branch setup before executing a plan.","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[137,138,139,140,141,142,143,144,145,111,146,147,30,29,148,149,150,151,152],"git","worktrees","git worktrees","using git worktrees","Using git","execution","branch setup","implementation","safe","plan","phase","parallel worktrees","setup","branches","branch","parallel",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":34},"01M71NSRQ1VYJT15323W6HE1X1","ubiquitous-language","Use when the user wants to define domain terms, build a glossary, harden terminology, or extract a DDD-style ubiquitous language. Saves to UBIQUITOUS_LANGUAGE.md.","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Fubiquitous-language\u002FSKILL.md",[],[160,161,162,163,88,164,165,166,29,31,167,168,169,30,170],"language","ubiquitous language","define","ddd","domain","style","terminology","extract","terms","harden","glossary",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":34},"01M71NSPGTE0PY0YJ9HSDWB62B","triage-issue","Use when the user reports a bug and wants it investigated and filed as a durable GitHub issue with a TDD-based fix plan.","https:\u002F\u002Fgithub.com\u002Fmax-kharena\u002Fnous\u002Fblob\u002Fmain\u002Fskills\u002Ftriage-issue\u002FSKILL.md",[],[178,179,180,181,31,182,183,109,184,185,146,90,186,30,29,187,188],"issue","triage issue","triage","github issue","it","bug","tdd","github","reports","fix","as"]