[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C4WM6AK1GXTNEKCASSZRCT":3,"skill-same:01M6C4WM6AK1GXTNEKCASSZRCT":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":6,"updatedAt":57,"install":58,"resources":70},"01M6C4WM6AK1GXTNEKCASSZRCT","improve-codebase-architecture",null,"Finds shallow modules and proposes deeper ones in an HTML report, then designs the chosen one. Use when the user wants better architecture, testability or interface design. For one refactor use refactoring-protocol; for a cleanup loop use rsi.","rubakas\u002Fagent-notes","rubakas","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35782457?v=4","01M6C4THGGA9DDE6AAEF5SZF6V","01M6C4THN6FV04VNKF1NG01W68",4,"MIT","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"improve","architecture","improve codebase architecture","codebase","testability","interface","design","true","for","deeper","modules","loop","use","cleanup","protocol","html report","report","refactoring","process","rsi","2026-11-10 10:12:30",false,"---\nname: improve-codebase-architecture\ndescription: Finds shallow modules and proposes deeper ones in an HTML report, then designs the chosen one. Use when the user wants better architecture, testability or interface design. For one refactor use refactoring-protocol; for a cleanup loop use rsi.\ndisable-model-invocation: true\ngroup: process\nargument-hint: \"[area, optional]\"\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\nThis command is _informed_ by the project's domain model and built on a shared design vocabulary:\n\n- Run the `\u002Fcodebase-design` skill for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, \"the interface is the test surface\", \"one adapter = hypothetical seam, two = real\"). Use these terms exactly in every suggestion — don't drift into \"component,\" \"service,\" \"API,\" or \"boundary.\"\n- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs\u002Fadr\u002F` record decisions this command should not re-litigate.\n\n## Process\n\n### 1. Explore\n\n**Scope before you scan — YAGNI.** Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide *where* to look before you look:\n\n- If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below.\n- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots — the files and areas that keep coming up — and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.\n\nRead the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first.\n\nThen dispatch the `explorer` agent to walk the codebase; if it isn't installed, fall back to the built-in Explore agent. Sub-agents don't inherit skills, so paste the five friction questions below and the `\u002Fcodebase-design` glossary terms into the explorer brief. 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 as an HTML report\n\nWrite a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `\u002Ftmp` (or `%TEMP%` on Windows), and write to `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open \u003Cpath>` on Linux, `open \u003Cpath>` on macOS, `cmd \u002Fc start \"\" \u003Cpath>` on Windows — and tell them the absolute path.\n\nThe report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph\u002Fflow\u002Fsequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS\u002FSVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs\u002FSVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before\u002Fafter visualisation**.\n\nFor each candidate, render a card with:\n\n- **Files** — which files\u002Fmodules are involved\n- **Problem** — one sentence: why the current architecture is causing friction\n- **Solution** — one sentence: what would change, in plain English\n- **Wins** — bullets explained in terms of locality and leverage, and how tests would improve\n- **Before \u002F After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening\n- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge\n\nEnd the report with a **Top recommendation** section: which candidate you'd tackle first and why.\n\n**Use CONTEXT.md vocabulary for the domain, and the `\u002Fcodebase-design` 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 the ADR. Mark it clearly in the card (e.g. a warning callout: _\"contradicts ADR-0007 — but worth reopening because…\"_). Don't list every theoretical refactor an ADR forbids.\n\nSee [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.\n\nBefore opening the report, check it for leaked template tokens: `grep -nE '\\{\\{|\\}\\}' \u003Cpath>` over the generated HTML. Fix hits that are leftover template tokens, not code excerpts, then open the report.\n\nDo NOT propose interfaces yet. After the file is written, ask the user: \"Which of these would you like to explore?\"\n\n### 3. Grilling loop\n\nOnce the user picks a candidate, run the `\u002Fgrilling` skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nRun `\u002Fdomain-modeling` as terms and decisions crystallise. Offer an ADR only if a future explorer would need the reason to avoid re-suggesting the same thing.\n\nTo explore alternative interfaces for the deepened module, run the `\u002Fcodebase-design` skill and use its design-it-twice parallel sub-agent pattern.\n\nStop when the user has a chosen interface direction and the `CONTEXT.md`\u002FADR updates are written.\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\nThis command is _informed_ by the project's domain model and built on a shared design vocabulary:\n\n- Run the `\u002Fcodebase-design` skill for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, \"the interface is the test surface\", \"one adapter = hypothetical seam, two = real\"). Use these terms exactly in every suggestion — don't drift into \"component,\" \"service,\" \"API,\" or \"boundary.\"\n- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs\u002Fadr\u002F` record decisions this command should not re-litigate.\n\n## Process\n\n### 1. Explore\n\n**Scope before you scan — YAGNI.** Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide *where* to look before you look:\n\n- If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below.\n- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots — the files and areas that keep coming up — and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.\n\nRead the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first.\n\nThen dispatch the `explorer` agent to walk the codebase; if it isn't installed, fall back to the built-in Explore agent. Sub-agents don't inherit skills, so paste the five friction questions below and the `\u002Fcodebase-design` glossary terms into the explorer brief. 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 as an HTML report\n\nWrite a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `\u002Ftmp` (or `%TEMP%` on Windows), and write to `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open \u003Cpath>` on Linux, `open \u003Cpath>` on macOS, `cmd \u002Fc start \"\" \u003Cpath>` on Windows — and tell them the absolute path.\n\nThe report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph\u002Fflow\u002Fsequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS\u002FSVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs\u002FSVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before\u002Fafter visualisation**.\n\nFor each candidate, render a card with:\n\n- **Files** — which files\u002Fmodules are involved\n- **Problem** — one sentence: why the current architecture is causing friction\n- **Solution** — one sentence: what would change, in plain English\n- **Wins** — bullets explained in terms of locality and leverage, and how tests would improve\n- **Before \u002F After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening\n- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge\n\nEnd the report with a **Top recommendation** section: which candidate you'd tackle first and why.\n\n**Use CONTEXT.md vocabulary for the domain, and the `\u002Fcodebase-design` 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 the ADR. Mark it clearly in the card (e.g. a warning callout: _\"contradicts ADR-0007 — but worth reopening because…\"_). Don't list every theoretical refactor an ADR forbids.\n\nSee [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.\n\nBefore opening the report, check it for leaked template tokens: `grep -nE '\\{\\{|\\}\\}' \u003Cpath>` over the generated HTML. Fix hits that are leftover template tokens, not code excerpts, then open the report.\n\nDo NOT propose interfaces yet. After the file is written, ask the user: \"Which of these would you like to explore?\"\n\n### 3. Grilling loop\n\nOnce the user picks a candidate, run the `\u002Fgrilling` skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nRun `\u002Fdomain-modeling` as terms and decisions crystallise. Offer an ADR only if a future explorer would need the reason to avoid re-suggesting the same thing.\n\nTo explore alternative interfaces for the deepened module, run the `\u002Fcodebase-design` skill and use its design-it-twice parallel sub-agent pattern.\n\nStop when the user has a chosen interface direction and the `CONTEXT.md`\u002FADR updates are written.\n",{"name":5,"group":41,"description":7,"argument-hint":48,"disable-model-invocation":49},"[area, optional]",true,"main","2b53465943af2bdffb61667ba9c3377a2ea8e649","agent_notes\u002Fdata\u002Fskills\u002Fimprove-codebase-architecture",2,"https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes","https:\u002F\u002Fgithub.com\u002Frubakas","https:\u002F\u002Frubakas.com","2026-11-04 06:46:55",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":49},[60,63,66],{"tool":61,"command":62},"npx","npx skills add rubakas\u002Fagent-notes --skill improve-codebase-architecture",{"tool":64,"command":65},"bunx","bunx skills add rubakas\u002Fagent-notes --skill improve-codebase-architecture",{"tool":67,"command":68},"pnpm","pnpm dlx skills add rubakas\u002Fagent-notes --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[71],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"HTML-REPORT.md","REFERENCE","参考文档",6597,"https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",[78,98,120,135,146,162],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":43},"01M6M445BZF5CP0C4VCF538T36","security-audit","Audits a codebase for security vulnerabilities, independently verifies each one, and writes a report. Use when asked for a full, multi-phase codebase security audit or pen test, or for focused security guidance on code.","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fsecurity-audit\u002FSKILL.md",[],[85,86,87,88,31,89,30,35,90,91,92,41,39,26,93,94,95,96,97],"security audit","audit","security","codebase security audit","security guidance","code","multi","test","guidance","vulnerabilities","full","guide","path",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":43},"01M6C4XHM2B03ZDXCSGE2MARZQ","wayfinder","Charts a map of investigation tickets on the issue tracker for work too big for one agent session, then resolves them one per session. Use when the user wants to wayfind a large loose idea or continue an existing wayfinder map.","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[100,105,106,41,107,108,31,109,30,110,35,111,112,113,114,115,116,117,118,119],"investigation","work","session","Charts","continue","map","Existing","number","URL","tracker","tickets","issue","issue tracker","user","idea",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":43},"01M6C4XFG6NNBQVTV6MHAC6BZW","triage","Triages issues and external PRs: categorises, verifies, grills if needed, and writes agent-ready briefs. Use when the user wants to triage the backlog or a specific issue or PR.","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Ftriage\u002FSKILL.md",[],[122,127,41,128,129,130,131,132,30,116,133,35,134,118],"ready","issues","pr","backlog","at","prs","look","briefs",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":43},"01M6C4XDMWQ5PM188GBGTAZ0A1","to-tickets","Breaks a plan, spec or conversation into tracer-bullet tickets, each declaring its blocking edges, and publishes them to the configured tracker. Use when the user wants a spec or plan turned into tickets or issues.","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fto-tickets\u002FSKILL.md",[],[142,115,143,41,144,118,145,128,30,35,112,113,114,116,97],"to tickets","plan","spec","conversation",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":43},"01M6C4XBXCF4ZN71K05B76YT1F","to-spec","Turns the current conversation into a spec and publishes it to the project issue tracker, with no interview, only synthesis of what was discussed. Use when the user wants the discussion written up as a spec.","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fto-spec\u002FSKILL.md",[],[153,144,154,41,118,145,155,156,157,30,158,35,159,114,116,117,160,161,97],"to spec","interview","as","project","up","only","with","it","Synthesis",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":171,"publishedAt":43},"01M6C4X99BG4ENH8GE9AK67902","setup-agent-tracker","Configures a repo's issue tracker, triage label vocabulary and domain doc layout for the agent-notes workflow skills. Use when starting in a new repo, once, before triage, to-spec, to-tickets or wayfinder.","https:\u002F\u002Fgithub.com\u002Frubakas\u002Fagent-notes\u002Fblob\u002Fmain\u002Fagent_notes\u002Fdata\u002Fskills\u002Fsetup-agent-tracker\u002FSKILL.md",[168],{"categoryNo":169,"categoryName":170,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[172,173,114,41,174,175,122,35,176,31,30,177,178,179,115,144,116,100,117,180],"setup agent tracker","setup","repo","doc","domain","workflow","notes","layout","new repo"]