| name | repo-context-map-author |
| description | Deep-scan the repo before any code is generated for a given task, and emit a `repo-context-map@1` capturing: (a) existing patterns the new code must follow (DI containers, error type, state-management style, logging convention), (b) database schemas + type interfaces in the task's declared module, (c) files outside the task's immediate domain that the implementation would touch, (d) the task's blast-radius estimate (file count + module count + cross-module edges), and (e) a flag if the task appears to belong in a different module than its catalogue placement. Used by chief-technology-officer/ship-tasks as step 1. Use when user asks to "draft a repo context map" or "create the repo context map". Do NOT use for "audit existing repo context map" (use repo-context-map-audit instead). |
| license | Apache-2.0 |
| metadata | {"version":"1.0.0","module":"skill","stage":"e","cyberos-template":"repo-context-map@1","cyberos-rubric-target":"repo_context_map_rubric@1.0"} |
| allowed_memory_scopes | {"read":["project:*","module:*"],"write":["project:task/{task_id}/repo-context-map"]} |
| audit | {"row_kind":"repo_context_map_authored","required_fields":["task_id","files_in_immediate_domain","files_outside_immediate_domain","modules_touched","blast_radius_score","existing_patterns_count"]} |
| inputs | [{"name":"task","format":"task@1","required":true},{"name":"repo_root","format":"absolute path","required":true},{"name":"scope","format":"repo | task","required":false,"default":"task"}] |
| outputs | [{"name":"context_map","format":"repo-context-map@1"}] |
| triggers | ["any task moving from `ready_to_implement` → `implementing`","workflow `chief-technology-officer/ship-tasks` step 1"] |
| blockers | ["repo has uncommitted divergent state — must be resolved first","task's declared module does not exist on disk — escalate to chief-product-officer"] |
| untrusted_inputs | {"wrap_in_marker":"untrusted_content","injection_scan":"required","on_marker_hit":"surface_to_human"} |
repo-context-map-author
1. Purpose
Build a static, code-aware snapshot of the parts of the repo that the incoming task will interact with — before any code is generated. The map is the input to the implementation-plan-author and the trigger for the optional architecture-decision-record auto-ADR when a task's blast radius exceeds the in-module threshold.
2. Output schema
task_id: task-<MODULE>-<NNN>
generated_at: <ISO-8601>
task_module: <module name from task frontmatter>
repo_root: <absolute path>
existing_patterns:
- { kind: error_type, value: "anyhow::Error / thiserror::Error / Result<T,E>", pinned_in: "<file:line>" }
- { kind: di_container, value: "axum Extension / global static / dependency-injection crate", pinned_in: "<file:line>" }
- { kind: state_management, value: "Arc<Mutex<T>> / actor / tokio::sync::RwLock", pinned_in: "<file:line>" }
- { kind: logging, value: "tracing / log / println!", pinned_in: }
{ , , }
{ , , [] }
{ , , }