[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7593PW49NAM8QMDQYA443A9":3,"skill-same:01M7593PW49NAM8QMDQYA443A9":64},{"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":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7593PW49NAM8QMDQYA443A9","legacy-codebase-navigation",null,"Navigate, understand, and debug large legacy codebases (Rails, Django, early Node). Techniques for tracing data through deep helper chains, reading mutation-heavy code without getting lost, and finding the exact transformation that damaged your data.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flegacy-codebase-navigation\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: legacy-codebase-navigation\ndescription: \"Navigate, understand, and debug large legacy codebases (Rails, Django, early Node). Techniques for tracing data through deep helper chains, reading mutation-heavy code without getting lost, and finding the exact transformation that damaged your data.\"\nversion: 1.0.0\nauthor: Steadfaste Fleet (troubleshooter)\nlicense: MIT\nplatforms: [macos, linux]\nmetadata:\n  hermes:\n    tags: [legacy, rails, debugging, codebase-navigation, data-tracing]\n    related_skills: [root-cause-debugging, project-map, codebase-design]\n---\n\n# Legacy Codebase Navigation\n\n## Overview\n\nLegacy codebases share common traits that make them harder to debug than greenfield projects:\n- **Deep helper chains** — data passes through 5+ transformation layers (controller → helper → sub-helper → sub-sub-helper)\n- **Mutation-heavy code** — `gsub!`, `gsub`, `strip`, `upcase` chained in long sequences, each step mutating state\n- **Side-effect rich** — functions set instance variables, write logs, touch the DB as a side effect of \"computation\"\n\n## Tracing Data Through Helper Chains\n\n### 1. Build the call graph first\n\nFind every link in the chain before touching code:\n\n```bash\n# In Rails: find the helper method and all its callers\ngrep -rn \"def my_helper\" app\u002Fhelpers\u002F\ngrep -rn \"my_helper(\" app\u002F --include=\"*.rb\" | grep -v \"def \"\n\n# In any codebase: who calls this method?\ngrep -rn \"method_name(\" . --include=\"*.rb\" --include=\"*.py\" --include=\"*.js\" | grep -v \"def \"\n```\n\n### 2. Trace the data, not the code\n\nFollow the **value** through each transformation. For each link in the chain,\nwrite down: input → output. When the output is wrong, the transformation that\nchanged it is the bug.\n\n```ruby\n# Instead of reading this chain linearly:\ntitle.gsub('(', ' - ').gsub(')', '').strip.upcase\n\n# Ask: what does EACH step do to the value?\n# 1. gsub('(', ' - ')   → \"Artist (INST.)\" → \"Artist  - INST.)\"\n# 2. gsub(')', '')      → \"Artist  - INST.\"\n# 3. strip              → \"Artist  - INST.\"\n# 4. upcase             → \"ARTIST  - INST.\"\n```\n\n### 3. Use the debugger at the boundary\n\nSet a breakpoint at the entry and exit of the suspect helper — not inside\nevery line:\n\n```bash\n# Rails: binding.pry at the helper entry, print the input\n# then step through only if the output looks wrong\n```\n\n## Reading Mutation-Heavy Code Without Getting Lost\n\n- **Make a state table** — list every variable and its value at each step.\n  Mutation chains are just state tables with the intermediate values hidden.\n- **Distinguish computation from side effects** — a method that mutates an\n  instance variable AND returns a value is doing two things; you must check both.\n- **Look for the \"last writer wins\" pattern** — in long chains, the final\n  mutation determines the result; earlier ones may be dead code or bugs.\n\n## Finding the Exact Transformation That Damaged Data\n\nWhen you know data is corrupted but not where:\n\n1. **Identify the shape of the damage** — what does the bad data look like\n   vs the good data? (Missing suffix? Wrong case? Duplicated text?)\n2. **Search for transformations that could produce it**:\n   ```bash\n   grep -rn \"gsub\\|sub(\\|strip\\|upcase\\|downcase\\|tr(\" app\u002Fhelpers\u002F app\u002Fmodels\u002F | head -50\n   ```\n3. **Reproduce with the actual data** — feed a known-good sample through each\n   candidate transformation in a console\u002FREPL and compare outputs.\n4. **Confirm with the DB** — find rows that match the damage pattern and rows\n   that don't; the transformation must explain the difference.\n\n## Pitfalls\n\n- ❌ **Reading linearly** — helper chains are trees, not lists. Trace values.\n- ❌ **Fixing the symptom** — the wrong output is produced 4 layers up; patching\n  the display hides it. Fix the transformation.\n- ❌ **Trusting method names** — `clean_title` may not clean anything. Read the body.\n- ❌ **Ignoring side effects** — a \"pure\" helper that writes to the DB is\n  anything but. Check for `update`, `save`, `create` in helpers.\n\n## Related\n- `root-cause-debugging` — the 6-phase debugging framework\n- `project-map` — structural project analysis\n- `codebase-design` — module vocabulary\n- `rails-data-pipeline-debugging` — specific data-pipeline patterns in Rails\n","# Legacy Codebase Navigation\n\n## Overview\n\nLegacy codebases share common traits that make them harder to debug than greenfield projects:\n- **Deep helper chains** — data passes through 5+ transformation layers (controller → helper → sub-helper → sub-sub-helper)\n- **Mutation-heavy code** — `gsub!`, `gsub`, `strip`, `upcase` chained in long sequences, each step mutating state\n- **Side-effect rich** — functions set instance variables, write logs, touch the DB as a side effect of \"computation\"\n\n## Tracing Data Through Helper Chains\n\n### 1. Build the call graph first\n\nFind every link in the chain before touching code:\n\n```bash\n# In Rails: find the helper method and all its callers\ngrep -rn \"def my_helper\" app\u002Fhelpers\u002F\ngrep -rn \"my_helper(\" app\u002F --include=\"*.rb\" | grep -v \"def \"\n\n# In any codebase: who calls this method?\ngrep -rn \"method_name(\" . --include=\"*.rb\" --include=\"*.py\" --include=\"*.js\" | grep -v \"def \"\n```\n\n### 2. Trace the data, not the code\n\nFollow the **value** through each transformation. For each link in the chain,\nwrite down: input → output. When the output is wrong, the transformation that\nchanged it is the bug.\n\n```ruby\n# Instead of reading this chain linearly:\ntitle.gsub('(', ' - ').gsub(')', '').strip.upcase\n\n# Ask: what does EACH step do to the value?\n# 1. gsub('(', ' - ')   → \"Artist (INST.)\" → \"Artist  - INST.)\"\n# 2. gsub(')', '')      → \"Artist  - INST.\"\n# 3. strip              → \"Artist  - INST.\"\n# 4. upcase             → \"ARTIST  - INST.\"\n```\n\n### 3. Use the debugger at the boundary\n\nSet a breakpoint at the entry and exit of the suspect helper — not inside\nevery line:\n\n```bash\n# Rails: binding.pry at the helper entry, print the input\n# then step through only if the output looks wrong\n```\n\n## Reading Mutation-Heavy Code Without Getting Lost\n\n- **Make a state table** — list every variable and its value at each step.\n  Mutation chains are just state tables with the intermediate values hidden.\n- **Distinguish computation from side effects** — a method that mutates an\n  instance variable AND returns a value is doing two things; you must check both.\n- **Look for the \"last writer wins\" pattern** — in long chains, the final\n  mutation determines the result; earlier ones may be dead code or bugs.\n\n## Finding the Exact Transformation That Damaged Data\n\nWhen you know data is corrupted but not where:\n\n1. **Identify the shape of the damage** — what does the bad data look like\n   vs the good data? (Missing suffix? Wrong case? Duplicated text?)\n2. **Search for transformations that could produce it**:\n   ```bash\n   grep -rn \"gsub\\|sub(\\|strip\\|upcase\\|downcase\\|tr(\" app\u002Fhelpers\u002F app\u002Fmodels\u002F | head -50\n   ```\n3. **Reproduce with the actual data** — feed a known-good sample through each\n   candidate transformation in a console\u002FREPL and compare outputs.\n4. **Confirm with the DB** — find rows that match the damage pattern and rows\n   that don't; the transformation must explain the difference.\n\n## Pitfalls\n\n- ❌ **Reading linearly** — helper chains are trees, not lists. Trace values.\n- ❌ **Fixing the symptom** — the wrong output is produced 4 layers up; patching\n  the display hides it. Fix the transformation.\n- ❌ **Trusting method names** — `clean_title` may not clean anything. Read the body.\n- ❌ **Ignoring side effects** — a \"pure\" helper that writes to the DB is\n  anything but. Check for `update`, `save`, `create` in helpers.\n\n## Related\n- `root-cause-debugging` — the 6-phase debugging framework\n- `project-map` — structural project analysis\n- `codebase-design` — module vocabulary\n- `rails-data-pipeline-debugging` — specific data-pipeline patterns in Rails\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":38,"description":7},"Steadfaste Fleet (troubleshooter)","1.0.0",{"hermes":27},{"tags":28,"related_skills":34},[29,30,31,32,33],"legacy","rails","debugging","codebase-navigation","data-tracing",[35,36,37],"root-cause-debugging","project-map","codebase-design",[39,40],"macos","linux","main","2e6aa8d15ab0a366c90be54f61bf9c6e97015e83","skills\u002Fsoftware-development\u002Flegacy-codebase-navigation",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill legacy-codebase-navigation",{"tool":56,"command":57},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill legacy-codebase-navigation",{"tool":59,"command":60},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill legacy-codebase-navigation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flegacy-codebase-navigation\u002FSKILL.md",true,[],[65,73,80,87,94,101],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":72},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":72},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":72},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":72},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":72},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":72},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]