1---2name: context-map3description: Build a concise map of files relevant to a requested code change before implementation. Use when the user asks to identify affected files, plan changes, map dependencies, find tests, locate reference patterns, or assess risk before editing.4---56<!-- Generated from harness/github-copilot/skills/context-map/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Context map910Search the repository for task-relevant code, dependencies, tests, and patterns, then return a risk-aware map that guides later implementation without changing files. If an upstream template supplies `task_description`, treat it as the task text.1112## When to invoke1314- "Create a context map for this task before coding."15- "Find the files I need to modify for this change."16- "Map dependencies and tests for this feature."17- "Assess implementation risk before making edits."1819## Discovery targets2021| Target | How to identify it | Include in map when |22| --- | --- | --- |23| Files to modify | Names, symbols, routes, commands, imports, configuration keys, or error text from the task. | The file owns behavior that must change. |24| Dependencies | Direct imports, exports, callers, generated types, schema references, or API contracts. | A modification may require a corresponding update. |25| Test files | Unit, integration, snapshot, e2e, fixture, or golden files near the affected behavior. | They verify or should verify the requested change. |26| Reference patterns | Existing code that solves a similar problem in the same repository. | It establishes style, architecture, or validation behavior to copy. |27| Risk items | Public APIs, migrations, configuration, concurrency, security, performance, or backward compatibility. | The change can break consumers or deployment. |2829## Procedure30311. Convert the user's task into searchable terms: domain nouns, function names, routes, CLI flags, UI labels, error messages, and config keys.322. Search for owning files first, then follow direct imports/exports and callers from those files.333. Search for tests using the same symbol names, fixtures, route names, snapshots, or directory conventions.344. Find at least one repository-native reference pattern when the task changes style-sensitive code.355. Stop at the smallest complete map; do not implement until the user or parent workflow asks for edits.3637## Risk assessment rules3839| Risk checkbox | Mark when |40| --- | --- |41| Breaking changes to public API | Function signatures, exported types, routes, CLI flags, schemas, or documented behavior may change. |42| Database migrations needed | Tables, columns, indexes, constraints, seed data, or persistence shape must change. |43| Configuration changes required | Environment variables, secrets, deployment manifests, feature flags, or package settings must change. |4445## Output template4647```markdown48## Context Map4950### Files to Modify51| File | Purpose | Changes Needed |52|------|---------|----------------|53| `path/to/file` | <description> | <what changes> |5455### Dependencies (may need updates)56| File | Relationship |57|------|--------------|58| `path/to/dep` | <imports/calls/exports affected symbol> |5960### Test Files61| Test | Coverage |62|------|----------|63| `path/to/test` | <behavior covered or missing> |6465### Reference Patterns66| File | Pattern |67|------|---------|68| `path/to/similar` | <example to follow> |6970### Risk Assessment71- [ ] Breaking changes to public API72- [ ] Database migrations needed73- [ ] Configuration changes required74```7576## Quality gate7778- [ ] Search terms came from the user's task, not generic repository browsing.79- [ ] Every proposed file to modify has a specific reason and expected change.80- [ ] Direct dependencies and tests were checked for each proposed modification area.81- [ ] At least one reference pattern is listed or the absence of a pattern is stated.82- [ ] Risk checkboxes reflect evidence from the repository.83- [ ] No implementation edits were made as part of the context map.