[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MZ493XAJBXC35CHW4MV066":3,"skill-same:01M6MZ493XAJBXC35CHW4MV066":67},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6MZ493XAJBXC35CHW4MV066","system-mapping",null,"Lightweight pre-flight checklist for understanding system context before code changes. Perform 5-point analysis of architecture, execution flows, logging, dependencies, and environment. Use before modifying unfamiliar code or multi-file changes.","snewhouse\u002Faa-ma-forge","snewhouse","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6317143?v=4","01M6MYYWF28C4KBQHHWB9SC6TS","Stephen J Newhouse","01M6MYYWJWQMDN2ZPFMJ584SSM",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fsystem-mapping\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"system mapping","mapping","system","environment","changes","for","flows","multi","dependencies","checklist","use","change","context","check","analysis","execution","file","logging","code","architecture","2026-11-10 10:12:30",false,"---\nname: system-mapping\ndescription: Lightweight pre-flight checklist for understanding system context before code changes. Perform 5-point analysis of architecture, execution flows, logging, dependencies, and environment. Use before modifying unfamiliar code or multi-file changes.\nwhen_to_use: Use for system mapping, a pre-flight check, understanding context before modifying code, or preparing a code change.\n---\n\n# System Mapping Skill\n\nA focused, rapid assessment protocol for understanding system context before making code changes. This is a **pre-flight checklist**, not a comprehensive audit.\n\n## Purpose\n\nPrevent \"change blindness\" by systematically understanding:\n- What you're touching\n- What depends on it\n- What it depends on\n- How to observe its behavior\n\n## When to Use\n\n### Decision Tree\n\n```\nMaking changes to code?\n│\n├── Quick single-file fix with known context?\n│   └── SKIP system mapping\n│\n├── Changes touch 3+ files?\n│   └── PERFORM system mapping\n│\n├── Unfamiliar code area?\n│   └── PERFORM system mapping\n│\n├── Integrating with external services?\n│   └── PERFORM system mapping\n│\n├── Modifying data pipelines or flows?\n│   └── PERFORM system mapping\n│\n└── Adding new functionality to existing module?\n    └── PERFORM system mapping (at least points 1, 4, 5)\n```\n\n### Comparison with Other Tools\n\n| Tool | Purpose | Depth | When |\n|------|---------|-------|------|\n| **system-mapping** | Pre-flight check | Focused | Before code changes |\n| codemem `diagram` \u002F `codemem draw` | Whole-repo structural map (L0–L3) | Broad | New codebase, major refactor |\n| `Skill(impact-analysis)` | Risk assessment | Moderate | After identifying changes |\n\n**Use system-mapping BEFORE you start, impact-analysis AFTER you plan changes.**\n\n---\n\n## 5-Point Protocol\n\n### Point 1: Architecture Mapping\n\n**Question:** What is the structural context of this code?\n\n**Actions:**\n- [ ] Identify all files that will be modified\n- [ ] Map the module\u002Fpackage boundaries\n- [ ] Find entry points (CLI commands, API endpoints, scheduled jobs)\n- [ ] Document component relationships\n\n**Index-enhanced (preferred — codemem; PROJECT_INDEX.json is codemem's fallback when present):**\n```\ncodemem MCP (builds its index on first query):\n  - file_summary(path) → symbols defined in each target file\n  - diagram(level=\"L1\") → directory map; diagram(level=\"L2\", scope=\u003Cdir>) → files + import\u002Fcall edges\n  - layers() → core \u002F middle \u002F periphery by incoming calls (core = most depended-on; entry points\n    usually sit in periphery — find them with the sg\u002FGrep step below)\nFallback — PROJECT_INDEX.json exists and codemem is not configured:\n  - file_summary(file), dir_purposes, tree, _meta.symbol_importance\n  This replaces manual Glob\u002FLS for structural discovery.\n```\n\n**Tools (fallback when no index):**\n```bash\n# Find related files\nGlob: pattern=\"**\u002F[module_name]*.py\"\n\n# List directory structure\nLS: path=\"src\u002F[area]\u002F\"\n\n# Find entry points\nGrep: pattern=\"@app.route|@click.command|def main|if __name__\"\n```\n\n**AST-enhanced (preferred when sg available):**\n```bash\n# Find class definitions structurally\nsg run -p 'class $NAME($$$BASES):' -l python src\u002F\n\n# Find decorated entry points (Flask\u002FFastAPI)\nsg run -p '@app.route($$$ARGS)\ndef $NAME($$$PARAMS):' -l python src\u002F\n\n# Find CLI entry points (Click)\nsg run -p '@click.command($$$)\ndef $NAME($$$):' -l python src\u002F\n\n# Find all function definitions in a module\nsg run -p 'def $NAME($$$PARAMS):' -l python src\u002F[module]\u002F\n```\n\n**Output:**\n```markdown\n### Architecture\n- **Files to modify:** [list]\n- **Module:** [package.subpackage]\n- **Entry points:** [CLI: cmd_name, API: \u002Fendpoint]\n- **Related components:** [list with relationships]\n```\n\n---\n\n### Point 2: Execution Flow Tracing\n\n**Question:** How does data\u002Fcontrol flow through this area?\n\n**Actions:**\n- [ ] Trace call chain from entry point to affected code\n- [ ] Identify async\u002Fsync boundaries\n- [ ] Map error propagation paths\n- [ ] Note any state mutations\n\n**Index-enhanced (preferred — codemem; PROJECT_INDEX.json is codemem's fallback when present):**\n```\ncodemem MCP:\n  - who_calls(target_function, max_depth=3) → transitive callers (upstream)\n  - callees(target_function, max_depth=3) → transitive callees (downstream)\n    (codemem's blast_radius is a deprecated alias of callees, removed after v0.18.x)\n  - dependency_chain(source, target) → shortest call path between two symbols\n  This gives the complete call graph without manual Grep.\n  Fallback: PROJECT_INDEX.json's tools (not codemem; it has no callees, and its blast_radius = callers by depth).\n```\n\n**Tools (fallback when no index):**\n```bash\n# Find function calls\nGrep: pattern=\"function_name\\\\(\" path=\"src\u002F\"\n\n# Trace async patterns\nGrep: pattern=\"async def|await|asyncio\" path=\"src\u002F[module]\u002F\"\n\n# Find error handling\nGrep: pattern=\"except|raise|try:\" path=\"src\u002F[module]\u002F\"\n```\n\n**AST-enhanced (preferred when sg available):**\n```bash\n# Find all callers of a function (structural — catches multiline calls)\nsg run -p 'target_function($$$ARGS)' -l python src\u002F\n\n# Trace async boundaries\nsg run -p 'await $EXPR' -l python src\u002F[module]\u002F\n\n# Map error propagation paths\nsg run -p 'raise $EXCEPTION' -l python src\u002F[module]\u002F\n\n# Find all try\u002Fexcept handlers for a specific exception\nsg run -p 'except $TYPE as $VAR:' -l python src\u002F\n\n# If sg unavailable, fall back to Grep patterns above\n```\n\n**Output:**\n```markdown\n### Execution Flow\n- **Call chain:** entry_point() → handler() → target_function()\n- **Async boundaries:** [sync until handler, async after]\n- **Error propagation:** [exceptions bubble to handler]\n- **State mutations:** [list mutable state touched]\n```\n\n---\n\n### Point 3: Logging Inventory\n\n**Question:** What observability exists for this code?\n\n**Actions:**\n- [ ] Find logger configuration\n- [ ] Document existing log statements in affected area\n- [ ] Identify log levels used\n- [ ] Note any metrics or tracing\n\n**Tools:**\n```bash\n# Find logger setup\nGrep: pattern=\"getLogger|logging.config|logger\\\\s*=\" path=\"src\u002F\"\n\n# Find log statements in area\nGrep: pattern=\"logger\\\\.(debug|info|warning|error|critical)\" path=\"src\u002F[module]\u002F\"\n\n# Find structured logging\nGrep: pattern=\"structlog|extra=|LogRecord\" path=\"src\u002F\"\n```\n\n**Output:**\n```markdown\n### Logging\n- **Logger:** [name, e.g., `__name__` or `app.module`]\n- **Config:** [file or inline, format]\n- **Current coverage:**\n  - Entry: [logged\u002Fnot logged]\n  - Success: [logged\u002Fnot logged]\n  - Errors: [logged\u002Fnot logged]\n- **Gaps:** [what's missing]\n```\n\n---\n\n### Point 4: Dependency Analysis\n\n**Question:** What does this code depend on, and what depends on it?\n\n**Actions:**\n- [ ] List imports in affected files\n- [ ] Identify external service calls (APIs, databases)\n- [ ] Check for version-sensitive dependencies\n- [ ] Find reverse dependencies (what imports this module)\n\n**Index-enhanced (preferred — codemem; PROJECT_INDEX.json is codemem's fallback when present):**\n```\ncodemem MCP:\n  - diagram(level=\"L2\", scope=file_path, hops=2) → imports and calls within 2 hops, BOTH directions\n    (forward deps and reverse deps — who imports this — in one cut)\nFallback — PROJECT_INDEX.json exists and codemem is not configured:\n  - dependency_chain(file_path, depth=5) → forward import tree; deps → per-file imports;\n    reverse deps still need Grep.\n```\n\n**Tools (fallback when no index):**\n```bash\n# Find imports in file\nGrep: pattern=\"^import|^from\" path=\"src\u002F[file].py\"\n\n# Find external calls\nGrep: pattern=\"requests\\\\.|httpx\\\\.|aiohttp|client\\\\.\" path=\"src\u002F[module]\u002F\"\n\n# Find database usage\nGrep: pattern=\"session\\\\.|query\\\\(|execute\\\\(\" path=\"src\u002F[module]\u002F\"\n\n# Find reverse dependencies\nGrep: pattern=\"from [module] import|import [module]\" path=\"src\u002F\"\n```\n\n**AST-enhanced (preferred when sg available):**\n```bash\n# Structural import detection (distinguishes import forms)\nsg run -p 'from $MODULE import $$$NAMES' -l python src\u002F\nsg run -p 'import $MODULE' -l python src\u002F\n\n# Find who imports a specific module\nsg run -p 'from [module] import $$$' -l python src\u002F\nsg run -p 'import [module]' -l python src\u002F\n\n# Find all external API calls (method calls on known clients)\nsg run -p 'self.client.$METHOD($$$ARGS)' -l python src\u002F\n\n# If sg unavailable, fall back to Grep patterns above\n```\n\n**Output:**\n```markdown\n### Dependencies\n- **Internal imports:** [list modules]\n- **External packages:** [list with versions if critical]\n- **Service calls:**\n  - Database: [yes\u002Fno, which]\n  - External APIs: [list]\n  - Message queues: [list]\n- **Reverse dependencies:** [modules that import this]\n```\n\n---\n\n### Point 5: Environment Scan\n\n**Question:** What runtime configuration affects this code?\n\n**Actions:**\n- [ ] List environment variables used\n- [ ] Find configuration files loaded\n- [ ] Identify feature flags\n- [ ] Document required secrets\u002Fcredentials\n\n**Tools:**\n```bash\n# Find env var usage\nGrep: pattern=\"os\\\\.environ|getenv|ENV\\\\[\" path=\"src\u002F[module]\u002F\"\n\n# Find config loading\nGrep: pattern=\"load_dotenv|config\\\\.|settings\\\\.\" path=\"src\u002F[module]\u002F\"\n\n# Find feature flags\nGrep: pattern=\"feature_flag|is_enabled|toggle\" path=\"src\u002F[module]\u002F\"\n```\n\n**Output:**\n```markdown\n### Environment\n- **Env vars:** [VAR_NAME: purpose]\n- **Config files:** [list paths]\n- **Feature flags:** [list with current states if known]\n- **Secrets required:** [list, mark as sensitive]\n```\n\n---\n\n## Complete Output Template\n\nAfter performing system mapping, produce this summary:\n\n```markdown\n## System Mapping: [Feature\u002FComponent Name]\n\n**Date:** [YYYY-MM-DD]\n**Scope:** [Brief description of planned changes]\n\n### 1. Architecture\n- **Files:** [list]\n- **Module:** [package path]\n- **Entry points:** [list]\n- **Boundaries:** [component relationships]\n\n### 2. Execution Flow\n- **Call chain:** A → B → C\n- **Async:** [boundaries noted]\n- **Errors:** [propagation path]\n\n### 3. Logging\n- **Logger:** [name]\n- **Coverage:** [assessment]\n- **Gaps:** [what to add]\n\n### 4. Dependencies\n- **Internal:** [modules]\n- **External:** [services]\n- **Reverse:** [dependents]\n\n### 5. Environment\n- **Env vars:** [list]\n- **Config:** [files]\n- **Flags:** [list]\n\n### Risk Assessment\n- **Blast radius:** [small\u002Fmedium\u002Flarge]\n- **Key concerns:** [list]\n- **Mitigation:** [approach]\n\n---\n*System mapping complete. Ready to proceed with changes.*\n```\n\n---\n\n## Integration with AA-MA\n\nWhen working within an AA-MA plan:\n\n1. **Perform system mapping** at the start of each milestone touching code\n2. **Add findings** to `[task]-reference.md` as immutable facts\n3. **Log the mapping** in `[task]-context-log.md`\n4. **Reference in provenance** if significant discoveries made\n\n**Example reference.md entry:**\n```markdown\n## System Context: [Module Name]\n\nEntry point: src\u002Fcli\u002Fmain.py:cmd_process\nLogger: app.processing (INFO level)\nKey env vars: PROCESSING_TIMEOUT, API_KEY\nDependencies: httpx, pydantic, sqlalchemy\n```\n\n---\n\n## Quick Reference\n\n```\n5-POINT PROTOCOL\n│\n├── 1. ARCHITECTURE\n│   └── Files, modules, entry points, boundaries\n│\n├── 2. EXECUTION FLOW\n│   └── Call chains, async, errors, state\n│\n├── 3. LOGGING\n│   └── Logger config, coverage, gaps\n│\n├── 4. DEPENDENCIES\n│   └── Imports, services, reverse deps\n│\n└── 5. ENVIRONMENT\n    └── Env vars, config, flags, secrets\n\nTRIGGERS (When to Use)\n├── 3+ files changing\n├── Unfamiliar code\n├── External integrations\n└── Data pipeline modifications\n\nOUTPUT\n└── Summary with risk assessment\n```\n\n---\n\n## Cross-References\n\n- `Skill(operational-constraints)` - Parent skill with full operational rules\n- `Skill(aa-ma-plan-workflow)` - Invokes system-mapping in Phase 3 when triggers match\n- `Skill(impact-analysis)` - Use AFTER system mapping to assess change risk\n- codemem MCP `diagram` \u002F `codemem draw` - Whole-repo structural map, directories down to symbols\n- `Skill(ast-grep)` - For structural code search during flow tracing\n","# System Mapping Skill\n\nA focused, rapid assessment protocol for understanding system context before making code changes. This is a **pre-flight checklist**, not a comprehensive audit.\n\n## Purpose\n\nPrevent \"change blindness\" by systematically understanding:\n- What you're touching\n- What depends on it\n- What it depends on\n- How to observe its behavior\n\n## When to Use\n\n### Decision Tree\n\n```\nMaking changes to code?\n│\n├── Quick single-file fix with known context?\n│   └── SKIP system mapping\n│\n├── Changes touch 3+ files?\n│   └── PERFORM system mapping\n│\n├── Unfamiliar code area?\n│   └── PERFORM system mapping\n│\n├── Integrating with external services?\n│   └── PERFORM system mapping\n│\n├── Modifying data pipelines or flows?\n│   └── PERFORM system mapping\n│\n└── Adding new functionality to existing module?\n    └── PERFORM system mapping (at least points 1, 4, 5)\n```\n\n### Comparison with Other Tools\n\n| Tool | Purpose | Depth | When |\n|------|---------|-------|------|\n| **system-mapping** | Pre-flight check | Focused | Before code changes |\n| codemem `diagram` \u002F `codemem draw` | Whole-repo structural map (L0–L3) | Broad | New codebase, major refactor |\n| `Skill(impact-analysis)` | Risk assessment | Moderate | After identifying changes |\n\n**Use system-mapping BEFORE you start, impact-analysis AFTER you plan changes.**\n\n---\n\n## 5-Point Protocol\n\n### Point 1: Architecture Mapping\n\n**Question:** What is the structural context of this code?\n\n**Actions:**\n- [ ] Identify all files that will be modified\n- [ ] Map the module\u002Fpackage boundaries\n- [ ] Find entry points (CLI commands, API endpoints, scheduled jobs)\n- [ ] Document component relationships\n\n**Index-enhanced (preferred — codemem; PROJECT_INDEX.json is codemem's fallback when present):**\n```\ncodemem MCP (builds its index on first query):\n  - file_summary(path) → symbols defined in each target file\n  - diagram(level=\"L1\") → directory map; diagram(level=\"L2\", scope=\u003Cdir>) → files + import\u002Fcall edges\n  - layers() → core \u002F middle \u002F periphery by incoming calls (core = most depended-on; entry points\n    usually sit in periphery — find them with the sg\u002FGrep step below)\nFallback — PROJECT_INDEX.json exists and codemem is not configured:\n  - file_summary(file), dir_purposes, tree, _meta.symbol_importance\n  This replaces manual Glob\u002FLS for structural discovery.\n```\n\n**Tools (fallback when no index):**\n```bash\n# Find related files\nGlob: pattern=\"**\u002F[module_name]*.py\"\n\n# List directory structure\nLS: path=\"src\u002F[area]\u002F\"\n\n# Find entry points\nGrep: pattern=\"@app.route|@click.command|def main|if __name__\"\n```\n\n**AST-enhanced (preferred when sg available):**\n```bash\n# Find class definitions structurally\nsg run -p 'class $NAME($$$BASES):' -l python src\u002F\n\n# Find decorated entry points (Flask\u002FFastAPI)\nsg run -p '@app.route($$$ARGS)\ndef $NAME($$$PARAMS):' -l python src\u002F\n\n# Find CLI entry points (Click)\nsg run -p '@click.command($$$)\ndef $NAME($$$):' -l python src\u002F\n\n# Find all function definitions in a module\nsg run -p 'def $NAME($$$PARAMS):' -l python src\u002F[module]\u002F\n```\n\n**Output:**\n```markdown\n### Architecture\n- **Files to modify:** [list]\n- **Module:** [package.subpackage]\n- **Entry points:** [CLI: cmd_name, API: \u002Fendpoint]\n- **Related components:** [list with relationships]\n```\n\n---\n\n### Point 2: Execution Flow Tracing\n\n**Question:** How does data\u002Fcontrol flow through this area?\n\n**Actions:**\n- [ ] Trace call chain from entry point to affected code\n- [ ] Identify async\u002Fsync boundaries\n- [ ] Map error propagation paths\n- [ ] Note any state mutations\n\n**Index-enhanced (preferred — codemem; PROJECT_INDEX.json is codemem's fallback when present):**\n```\ncodemem MCP:\n  - who_calls(target_function, max_depth=3) → transitive callers (upstream)\n  - callees(target_function, max_depth=3) → transitive callees (downstream)\n    (codemem's blast_radius is a deprecated alias of callees, removed after v0.18.x)\n  - dependency_chain(source, target) → shortest call path between two symbols\n  This gives the complete call graph without manual Grep.\n  Fallback: PROJECT_INDEX.json's tools (not codemem; it has no callees, and its blast_radius = callers by depth).\n```\n\n**Tools (fallback when no index):**\n```bash\n# Find function calls\nGrep: pattern=\"function_name\\\\(\" path=\"src\u002F\"\n\n# Trace async patterns\nGrep: pattern=\"async def|await|asyncio\" path=\"src\u002F[module]\u002F\"\n\n# Find error handling\nGrep: pattern=\"except|raise|try:\" path=\"src\u002F[module]\u002F\"\n```\n\n**AST-enhanced (preferred when sg available):**\n```bash\n# Find all callers of a function (structural — catches multiline calls)\nsg run -p 'target_function($$$ARGS)' -l python src\u002F\n\n# Trace async boundaries\nsg run -p 'await $EXPR' -l python src\u002F[module]\u002F\n\n# Map error propagation paths\nsg run -p 'raise $EXCEPTION' -l python src\u002F[module]\u002F\n\n# Find all try\u002Fexcept handlers for a specific exception\nsg run -p 'except $TYPE as $VAR:' -l python src\u002F\n\n# If sg unavailable, fall back to Grep patterns above\n```\n\n**Output:**\n```markdown\n### Execution Flow\n- **Call chain:** entry_point() → handler() → target_function()\n- **Async boundaries:** [sync until handler, async after]\n- **Error propagation:** [exceptions bubble to handler]\n- **State mutations:** [list mutable state touched]\n```\n\n---\n\n### Point 3: Logging Inventory\n\n**Question:** What observability exists for this code?\n\n**Actions:**\n- [ ] Find logger configuration\n- [ ] Document existing log statements in affected area\n- [ ] Identify log levels used\n- [ ] Note any metrics or tracing\n\n**Tools:**\n```bash\n# Find logger setup\nGrep: pattern=\"getLogger|logging.config|logger\\\\s*=\" path=\"src\u002F\"\n\n# Find log statements in area\nGrep: pattern=\"logger\\\\.(debug|info|warning|error|critical)\" path=\"src\u002F[module]\u002F\"\n\n# Find structured logging\nGrep: pattern=\"structlog|extra=|LogRecord\" path=\"src\u002F\"\n```\n\n**Output:**\n```markdown\n### Logging\n- **Logger:** [name, e.g., `__name__` or `app.module`]\n- **Config:** [file or inline, format]\n- **Current coverage:**\n  - Entry: [logged\u002Fnot logged]\n  - Success: [logged\u002Fnot logged]\n  - Errors: [logged\u002Fnot logged]\n- **Gaps:** [what's missing]\n```\n\n---\n\n### Point 4: Dependency Analysis\n\n**Question:** What does this code depend on, and what depends on it?\n\n**Actions:**\n- [ ] List imports in affected files\n- [ ] Identify external service calls (APIs, databases)\n- [ ] Check for version-sensitive dependencies\n- [ ] Find reverse dependencies (what imports this module)\n\n**Index-enhanced (preferred — codemem; PROJECT_INDEX.json is codemem's fallback when present):**\n```\ncodemem MCP:\n  - diagram(level=\"L2\", scope=file_path, hops=2) → imports and calls within 2 hops, BOTH directions\n    (forward deps and reverse deps — who imports this — in one cut)\nFallback — PROJECT_INDEX.json exists and codemem is not configured:\n  - dependency_chain(file_path, depth=5) → forward import tree; deps → per-file imports;\n    reverse deps still need Grep.\n```\n\n**Tools (fallback when no index):**\n```bash\n# Find imports in file\nGrep: pattern=\"^import|^from\" path=\"src\u002F[file].py\"\n\n# Find external calls\nGrep: pattern=\"requests\\\\.|httpx\\\\.|aiohttp|client\\\\.\" path=\"src\u002F[module]\u002F\"\n\n# Find database usage\nGrep: pattern=\"session\\\\.|query\\\\(|execute\\\\(\" path=\"src\u002F[module]\u002F\"\n\n# Find reverse dependencies\nGrep: pattern=\"from [module] import|import [module]\" path=\"src\u002F\"\n```\n\n**AST-enhanced (preferred when sg available):**\n```bash\n# Structural import detection (distinguishes import forms)\nsg run -p 'from $MODULE import $$$NAMES' -l python src\u002F\nsg run -p 'import $MODULE' -l python src\u002F\n\n# Find who imports a specific module\nsg run -p 'from [module] import $$$' -l python src\u002F\nsg run -p 'import [module]' -l python src\u002F\n\n# Find all external API calls (method calls on known clients)\nsg run -p 'self.client.$METHOD($$$ARGS)' -l python src\u002F\n\n# If sg unavailable, fall back to Grep patterns above\n```\n\n**Output:**\n```markdown\n### Dependencies\n- **Internal imports:** [list modules]\n- **External packages:** [list with versions if critical]\n- **Service calls:**\n  - Database: [yes\u002Fno, which]\n  - External APIs: [list]\n  - Message queues: [list]\n- **Reverse dependencies:** [modules that import this]\n```\n\n---\n\n### Point 5: Environment Scan\n\n**Question:** What runtime configuration affects this code?\n\n**Actions:**\n- [ ] List environment variables used\n- [ ] Find configuration files loaded\n- [ ] Identify feature flags\n- [ ] Document required secrets\u002Fcredentials\n\n**Tools:**\n```bash\n# Find env var usage\nGrep: pattern=\"os\\\\.environ|getenv|ENV\\\\[\" path=\"src\u002F[module]\u002F\"\n\n# Find config loading\nGrep: pattern=\"load_dotenv|config\\\\.|settings\\\\.\" path=\"src\u002F[module]\u002F\"\n\n# Find feature flags\nGrep: pattern=\"feature_flag|is_enabled|toggle\" path=\"src\u002F[module]\u002F\"\n```\n\n**Output:**\n```markdown\n### Environment\n- **Env vars:** [VAR_NAME: purpose]\n- **Config files:** [list paths]\n- **Feature flags:** [list with current states if known]\n- **Secrets required:** [list, mark as sensitive]\n```\n\n---\n\n## Complete Output Template\n\nAfter performing system mapping, produce this summary:\n\n```markdown\n## System Mapping: [Feature\u002FComponent Name]\n\n**Date:** [YYYY-MM-DD]\n**Scope:** [Brief description of planned changes]\n\n### 1. Architecture\n- **Files:** [list]\n- **Module:** [package path]\n- **Entry points:** [list]\n- **Boundaries:** [component relationships]\n\n### 2. Execution Flow\n- **Call chain:** A → B → C\n- **Async:** [boundaries noted]\n- **Errors:** [propagation path]\n\n### 3. Logging\n- **Logger:** [name]\n- **Coverage:** [assessment]\n- **Gaps:** [what to add]\n\n### 4. Dependencies\n- **Internal:** [modules]\n- **External:** [services]\n- **Reverse:** [dependents]\n\n### 5. Environment\n- **Env vars:** [list]\n- **Config:** [files]\n- **Flags:** [list]\n\n### Risk Assessment\n- **Blast radius:** [small\u002Fmedium\u002Flarge]\n- **Key concerns:** [list]\n- **Mitigation:** [approach]\n\n---\n*System mapping complete. Ready to proceed with changes.*\n```\n\n---\n\n## Integration with AA-MA\n\nWhen working within an AA-MA plan:\n\n1. **Perform system mapping** at the start of each milestone touching code\n2. **Add findings** to `[task]-reference.md` as immutable facts\n3. **Log the mapping** in `[task]-context-log.md`\n4. **Reference in provenance** if significant discoveries made\n\n**Example reference.md entry:**\n```markdown\n## System Context: [Module Name]\n\nEntry point: src\u002Fcli\u002Fmain.py:cmd_process\nLogger: app.processing (INFO level)\nKey env vars: PROCESSING_TIMEOUT, API_KEY\nDependencies: httpx, pydantic, sqlalchemy\n```\n\n---\n\n## Quick Reference\n\n```\n5-POINT PROTOCOL\n│\n├── 1. ARCHITECTURE\n│   └── Files, modules, entry points, boundaries\n│\n├── 2. EXECUTION FLOW\n│   └── Call chains, async, errors, state\n│\n├── 3. LOGGING\n│   └── Logger config, coverage, gaps\n│\n├── 4. DEPENDENCIES\n│   └── Imports, services, reverse deps\n│\n└── 5. ENVIRONMENT\n    └── Env vars, config, flags, secrets\n\nTRIGGERS (When to Use)\n├── 3+ files changing\n├── Unfamiliar code\n├── External integrations\n└── Data pipeline modifications\n\nOUTPUT\n└── Summary with risk assessment\n```\n\n---\n\n## Cross-References\n\n- `Skill(operational-constraints)` - Parent skill with full operational rules\n- `Skill(aa-ma-plan-workflow)` - Invokes system-mapping in Phase 3 when triggers match\n- `Skill(impact-analysis)` - Use AFTER system mapping to assess change risk\n- codemem MCP `diagram` \u002F `codemem draw` - Whole-repo structural map, directories down to symbols\n- `Skill(ast-grep)` - For structural code search during flow tracing\n",{"name":5,"description":7,"when_to_use":44},"Use for system mapping, a pre-flight check, understanding context before modifying code, or preparing a code change.","main","cd9a2962c9a7e0797fe440f7b1ba4ceccc16ae0d","claude-code\u002Fskills\u002Fsystem-mapping",1,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge","https:\u002F\u002Fgithub.com\u002Fsnewhouse","Data Scientist, Bioinformatician, Dad, Husband, MS warrior","2026-11-12 06:45:42",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add snewhouse\u002Faa-ma-forge --skill system-mapping",{"tool":59,"command":60},"bunx","bunx skills add snewhouse\u002Faa-ma-forge --skill system-mapping",{"tool":62,"command":63},"pnpm","pnpm dlx skills add snewhouse\u002Faa-ma-forge --skill system-mapping","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fsystem-mapping\u002FSKILL.md",true,[],[68,87,103,124,148,173],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6MZ588SD5DDH59H18PRNWEV","deploy-helper","You can use this to help with deploy stuff, deploying, deployments, releases, shipping, pushing to prod, going live, rollouts.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fevals\u002Fskill-draft\u002Fdraft\u002FSKILL.md",[],[75,76,77,78,79,80,81,82,83,29,84,85,86],"deploy","deploy helper","helper","you","live","with","can","rollouts","shipping","deployments","releases","help",{"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":91,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":39},"01M6MZ54NEKRYXGMJ1KJWYMKM7","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","MIT","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[96,97,24,98,29,99,100,101,102],"writing","writing for agents","line","instructions","read","editing","documents",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M6MZ500T0FH1G8TBSQV7G5G2","verify-plan","Slash entry for plan verification: runs plan-verification on an existing AA-MA plan, writes [task]-verification.md, and with --iterate loops until the plan converges. Use when the user types \u002Fverify-plan or wants the verification report saved.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fverify-plan\u002FSKILL.md",[],[110,111,112,113,114,29,115,80,116,117,118,119,120,121,122,24,123],"verify","plan","verify plan","loops","task","user","verification","report","types","plan verification","entry","iterate","Existing","saved",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":39},"01M6MZ4V9ST4K54NT1SRBGCE7P","verify-impl","Post-impl adversarial review symmetric to \u002Fverify-plan. Dispatches up to 5 parallel audit agents (code-reviewer, security-auditor, tdd-sequence-auditor, context7-evidence-auditor, future-proofing-auditor) based on the milestone's plan-declared Audit-Profile. CRITICAL findings surface via AskUserQuestion accept\u002Fdispute\u002Fdefer panel before §7.3 user authorization. Introduced in v0.8.0 per ADR-0005. Invoked by Phase 6.8 of \u002Fexecute-aa-ma-milestone.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fverify-impl\u002FSKILL.md",[],[131,132,110,133,134,135,136,137,138,139,140,141,142,143,144,111,145,37,146,147],"impl","verify impl","adversarial","post","panel","via","critical","review","context7","up","evidence","reviewer","parallel","adr","audit","tdd","milestone",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":39},"01M6MZ4K7CC9PMJ1KEY3F53RS1","understand-codebase","Onboard to a new, inherited, or shared codebase. Read it, understand it, map it, and learn its conventions, versioning, tests, tech stack, rules (AGENTS.md \u002F CLAUDE.md \u002F .cursorrules \u002F etc.), build\u002Frun\u002FCI, integrations, security posture, and repo health — then produce an honest pros\u002Fcons verdict, a \"contribute safely\" playbook, and an \"add a feature\" playbook, written to ONBOARDING.md at the repo root plus a .claude\u002Fonboarding\u002F set of deep-dives — and optionally author an AGENTS.md if one is missing, or review and propose improvements to an existing one. Tiered (Quick \u002F Standard \u002F Deep). Reuses codemem (index + diagrams), gsd-map-codebase, system-mapping, code-intelligence, impact-analysis rather than re-implementing them; Deep tier runs a TeamCreate agent-team. Keywords: new codebase, shared codebase, inherited code, onboard, understand this repo, how do I contribute, how do I add a feature, ramp up, get oriented, ONBOARDING.md, AGENTS.md, codebase walkthrough, joining a project.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Funderstand-codebase\u002FSKILL.md",[],[155,156,157,140,158,33,159,160,161,162,163,164,165,166,167,168,169,170,171,172],"understand codebase","codebase","understand","walkthrough","SET","ci","learn","diagrams","repo health","implementing","re","quick","impact","get","project","deep","shared","map",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":39},"01M6MZ4D1ZC8MTW064QXY6WC76","token-compression","Output token compression for AA-MA workflows. Reduces response tokens by 40-75% while preserving full technical accuracy. Three intensity levels mapped to execution modes: lite (HITL), full (general), ultra (AFK). Auto-activates during AA-MA execution based on task Mode field. Manual activation via \u002Fcompress lite|full|ultra.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Ftoken-compression\u002FSKILL.md",[],[180,181,182,183,184,185,186,24,187,188,136,189,190,191,192,114,193,194,195,34],"compression","token compression","token","workflows","output","modes","accuracy","mode","manual","intensity","tokens","hitl","three","general","auto","technical"]