WHAT
Purpose and context
- Purpose: Before modifying any symbol (function, class, variable, config key), map all dependents so no callers blindsided.
- Trigger (when to use):
- Before editing shared utility, base class, or widely-imported module
- Before renaming or deleting anything
- As first step of
safe-changeorpropose
- Non-goals: does not modify code (output only); does not create wiki pages for undocumented symbols (only record gaps).
Mental model
symbol → mọi reference (import · call · đọc output) → Direct / Indirect → test refs tách riêng → báo cáo + wiki gap.
Input and output contract
| Field | Required? | Meaning | |
|---|---|---|---|
| In | symbol(s) to change | yes | function, class, variable, config key |
| Out | reference list | yes | file path, line number, usage, Direct/Indirect label; if zero outside the file, state it clearly |
| Out | test refs | yes if any | list separately |
| Out | wiki gap | if any | symbol not yet in wiki/ |
| Out | draft output report | yes (unless 0 artefacts) | llmwiki/wiki/sources/draft/DDMMYY-<ten>.md |
Rules and capabilities
- RULE-01 (MUST): Do not modify anything during this skill — output only.
- RULE-02 (MUST): If codebase large, search by symbol name AND file pattern (e.g. all
*.tsfiles). - RULE-03 (MUST): Do not assume symbol unused because no direct callers — check indirect dependents too.
- Capabilities: read/search the entire codebase (text search or code graph); write draft report + wiki index/log.
Failure boundaries
- Ambiguous symbol (multiple definitions with the same name) → clarify the exact symbol.
- Zero references outside the file → succeeded, state clearly "0 references outside the file".
- Cannot find everything (codebase too large, search error) → partial, record the scope scanned.
HOW
Main workflow
| Step | Type | Inputs | Action | Outputs/exit | Failure/next |
|---|---|---|---|---|---|
| W01 | judgment | change request | Identify the exact symbol | symbol list | ambiguous → clarify |
| W02 | deterministic | symbol | Find all imports/calls/references across the codebase | hits | large → name + file pattern |
| W03 | deterministic | hits | Record file path, line, usage | ref table | — |
| W04 | judgment | ref table | Classify Direct / Indirect | labeled refs | — |
| W05 | deterministic | ref | Report fully, separate test refs, if zero state explicitly | report | — |
| W06 | deterministic | wiki/ |
Note gap if symbol not yet documented (do not create entry) | gap note | — |
| W07 | effect | result | Output Report draft | draft + index + log | 0 artefacts → skip |
Step-by-step details (source of truth for W01–W07):
- Identify exact symbol(s) to change.
- Search entire codebase for all imports, calls, references to each symbol.
- For each reference: note file path, line number, how it uses symbol.
- Classify each reference:
- Direct — calls or imports symbol itself
- Indirect — depends on behaviour symbol produces (e.g. reads its output)
- Report full list. If zero references found outside file, state explicitly.
- Flag any reference in test file separately — those must update or give false confidence.
- If symbol not yet documented in
wiki/, note as gap — do not create entry now. Wiki entries only written after code committed (seeverify-before-commit).
Branches
| ID | Kind | Guard | Behaviour | Skip / failure | Rejoin |
|---|---|---|---|---|---|
| B01 | conditional_required | large codebase | search by symbol name AND file pattern (RULE-02) | — | W03 |
| B02 | conditional_required | there are references in test file | list separately, warn must update | none → skip | W06 |
Validation and stopping
Stop when every hit has path + line + Direct/Indirect label. Do not conclude "unused" just because there is no direct caller (RULE-03). No code file is modified.
Examples
- Positive: changed signature
formatDate(d)insrc/utils/date.ts→ 12 Direct (import) + 2 Indirect (read output string to parse) + 3 test refs listed separately → report + draftDDMMYY-impact-format-date.md. - Boundary/failure: config key
retry_limithas no direct caller but is read viaconfig[key]dynamically → classify as Indirect, do NOT report "unused"; if scan is incomplete, report partial with scope.
Delivery — Output Report
After all main skill tasks complete, write a propose draft to the wiki.
Steps
1. Build the filename:
- Format:
DDMMYY-<ten>.md DDMMYY= today (e.g.,020626for 2 June 2026)<ten>= 2–4 kebab-case words summarising what was done (e.g.,landing-page-coteccons,brand-kit-fintech,ingest-auth-spec)
2. Write llmwiki/wiki/sources/draft/DDMMYY-<ten>.md:
---
type: draft
title: "DDMMYY-<ten>"
status: proposed
tags: [<skill-name>, output-report]
timestamp: YYYY-MM-DD
---
# DDMMYY-<ten>
**Type:** draft
**Status:** proposed
**Tags:** <skill-name>, output-report
**Proposed:** YYYY-MM-DD
## What
<One sentence — what this skill invocation produced or decided>
## Output
<Key artefacts, files created/modified, or decisions made>
## Files
| File | Action |
|------|--------|
| `path/to/file` | created / modified |
## Notes
- Invoked via: `/<skill-name>` skill
## Origin
- **Draft:** `wiki/sources/draft/DDMMYY-<ten>.md`
- **Commit:** _(filled by verify-before-commit)_
- **Date promoted:** _(filled by verify-before-commit)_
3. Update wiki index & log:
llmwiki/wiki/index.md— append one row:| [DDMMYY-<ten>](sources/draft/DDMMYY-<ten>.md) | draft | YYYY-MM-DD |llmwiki/wiki/log.md— append:## YYYY-MM-DD — <skill-name> — <ten>
Skip only when the skill produces zero artefacts and zero decisions (e.g., a pure display mode like
/caveman-stats).