Logo vun Shadow Frog Update

Shadow Frog Update

Organisatioun
microsoft
shadow-frog-update

Update the shadow knowledge base after code changes and from conversational insights. Detects what changed via git diff, refreshes per-file shadows, captures knowledge shared by the user during the session, and updates cross-cutting discoveries. Invoke manually with /shadow-frog-update; the preToolUse hook will remind the agent when the shadow is behind HEAD.

Iwwersiicht

Editeurmicrosoft
RepositoryShadowFrog
Skill-Nummshadow-frog-update
Stären
33
Forks
9
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum microsoft op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Shadow Frog Update an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-update
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/ShadowFrog.git /tmp/ShadowFrog
mkdir -p .claude/skills
cp -r /tmp/ShadowFrog/skills/shadow-frog-update .claude/skills/shadow-frog-update
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Shadow Frog Update an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Shadow Frog Update automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Shadow Frog Update net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

ShadowFrog Update

Updates .shadow/ from two sources: code changes (git diff) and conversational knowledge (what the user said during the session). Prerequisite: .shadow/ exists.

Triggers

  1. Hook reminder: preToolUse injects a staleness warning when .shadow/_meta/state.json#last_commit differs from HEAD. The hook only reminds — it does NOT auto-run update.
  2. Manual: user invokes /shadow-frog-update

Phase 1: Detect Changes

bash
# Read last_commit defensively: it may be missing, or the literal "none"
# when init ran without git (e.g. inside a container). `git diff none HEAD`
# would abort with "fatal: bad revision 'none'", and a missing key would
# make $LAST_COMMIT empty so `git diff HEAD` silently reports the wrong set.
LAST_COMMIT=$(python3 -c "import json,sys; print(json.load(sys.stdin).get('last_commit','none'))" < .shadow/_meta/state.json 2>/dev/null || echo "none")
if git rev-parse --verify "$LAST_COMMIT" >/dev/null 2>&1; then
    git diff --name-only "$LAST_COMMIT" HEAD   # committed changes since last update
else
    echo "WARNING: state.json has no usable last_commit — falling back to a full re-scan."
fi
git diff --name-only HEAD                       # uncommitted changes
git diff --name-only --cached                   # staged changes

Categorize: modified, added, deleted, renamed.

Phase 2: Update Per-File Shadows (Symbol-Level)

Use the same extraction interface as init, rather than inventing a separate symbol scanner. From the project root:

powershell
python .github\skills\shadow-frog-init\shadow-init.py --symbols-only
# Claude Code: use .claude\skills\shadow-frog-init\shadow-init.py instead.

This prints JSON without changing .shadow/. It inherits the optional symbol_backend configuration from _meta/state.json (absent means regex). For Astred, run python install-astred.py (Linux: python3) from the ShadowFrog checkout once; setup defaults to latest stable, with optional --version <exact-version>. The executable is discovered from per-user setup configuration. SHADOWFROG_ASTRED_COMMAND or --astred-command override it; do not store its path in shared metadata. Unchanged Python files reuse _meta/symbols.json; changed Python files are batched through the pinned backend. C/C++ uses the recorded build-derived Astred project (or --astred-project). Native projects are always reparsed, even without source diffs, because headers can change declarations in unchanged translation units. Keep the configured compiler environment, includes, defines, and forced headers available; setup alone does not generate an OS build project. Other languages explicitly use regex. Stop on extraction failure; a failed inventory does not mean that all symbols disappeared. Use each record's qualified_name for file::symbol references and heading for Markdown headings.

When adopting Astred, upgrading its release/normalizer, or changing the native project/compile settings, first run --preview-migration --symbol-backend astred with the intended executable. Treat all affected shadow files as changed, even without a source diff. Also compare freshly extracted native symbols for unchanged source files after header changes; source hashes alone are insufficient. Review scope-change candidates; do not assume same-leaf names prove identity. Preserve unmatched/ambiguous sections and their discoveries as history until resolved. Apply only confirmed mappings, updating Also involves: and _cross/ **Refs**: consistently, without changing trust metadata or citation scores. Never use --reset to migrate. This is a reviewed agent workflow, not an automatic knowledge-rewriting command.

For each changed file, update its shadow at the symbol level:

Symbol changeAction
AddedAdd the appropriate ##/### heading
RemovedMark the section REMOVED; keep discoveries for history
RenamedMove discoveries to the updated heading
ModifiedCheck whether discoveries still hold

Only mark source: user discoveries stale if the symbol is completely removed.

Lightweight update (auto/hook): re-extract symbols, update headings, flag stale. Deep update (manual/dream): read diffs, generate new discoveries, verify existing ones.

Phase 3: Capture Conversational Knowledge

When the user shares knowledge during the session, write it immediately. Do not batch for later.

Capture warnings, gotchas, design intent, history, deprecations, contracts, and conventions. Representative examples:

SignalExampleCategory
Warning"Don't change the retry logic, it's subtle"warning
Design intent"We use this pattern because the API is unreliable"intent
Convention"Always use the helper in utils.py, not raw SQL"convention

Write as:

markdown
- <user's words, as close to verbatim as possible>
  _(verified, source: user, citation_score: 0)_

For knowledge emerging from collaborative work (debugging, refactoring, test failures):

markdown
- <what was discovered and how>
  _(verified, source: interaction, citation_score: 0)_

Anchor to the specific file::symbol. source: user and source: interaction are always verified.

Auto-Placement

Users will not specify where to store their knowledge. You must find the correct location. Procedure:

  1. Parse the user's statement for code references — file names, function names, class names, module names, variable names, error messages, CLI flags.
  2. If the knowledge is a project-wide preference or convention with no code references (e.g., "always use snake_case", "no backward compatibility", "prefer small PRs") → write to _prefs.md.
  3. If explicit references found → look up those file::symbol paths in _index.md and the corresponding shadow files.
  4. If no explicit references → use context:
    • What file is the user currently viewing or editing?
    • What files were recently modified in this session?
    • Search shadow files: grep -rl "<keyword>" .shadow/ --include="*.md"
  5. If multiple candidate locations → pick the most specific symbol that the knowledge applies to. Prefer a single file::symbol over file-level.
  6. If the knowledge spans 3+ files → create a _cross/<slug>.md entry and add back-pointers to each involved file's ## Cross-References. For 2-file discoveries, use per-file entries with Also involves: instead.
  7. If no matching location exists (e.g., the user mentions a concept not yet in the shadow) → place at the file-level ## File-Level section of the most relevant file, or create a new _cross/ entry for repo-wide knowledge.

Never ask the user "where should I put this?" — always resolve placement yourself.

Phase 4: Extract Session Insights

At session end or manual trigger, review the session for:

  1. Files modified and why
  2. Patterns revealed by the changes
  3. Unrecorded conversational knowledge (user statements not yet shadowed)
  4. Cross-cutting discoveries (create in _cross/<slug>.md if 3+ files involved)

Phase 5: Handle Structural Changes

Added files:

  1. Check .shadow/.shadowignore — skip if the file matches an ignore pattern
  2. Create .shadow/<path>/<file>.md with symbol-organized template
  3. Add ## Cross-References section
  4. Add to _index.md

Deleted files:

  1. Add ORPHANED marker to shadow header
  2. Keep shadow (discoveries explain history)
  3. Mark [REMOVED] on any _cross/ refs pointing to this file
  4. Update _index.md

Renamed files:

  1. Move .shadow/<old>.md to .shadow/<new>.md
  2. Update all _cross/ **Refs**: entries (old path → new path)
  3. Update all Also involves: in other per-file shadows
  4. Update _index.md
  5. Preserve all discoveries

Phase 6: Verify and Dedup

Follow the dedup and writing rules in /shadow-frog — read before write, merge or update existing entries, fix bad format in place.

Verify exploration discoveries using the observe-based or do-based methods in /shadow-frog § Verification. source: user and source: interaction → always verified; only re-verify if the underlying code changes.

Phase 7: Verify Reference Integrity

Check the five core invariants (full 7-invariant set in /shadow-frog):

  • Every _cross/<slug>.md ref has a back-pointer in per-file ## Cross-References
  • Every ## Cross-References entry has a corresponding _cross/<slug>.md
  • No duplicate cross-cutting filenames
  • All Also involves: use file::symbol notation
  • No duplicate discoveries (same behavioral claim at same symbol)

Repair any violations before proceeding.

Phase 8: Update Metadata

Preserve dream_cycles_completed from the existing state — only dream-reconcile.py increments it. Also preserve optional symbol_backend metadata. After a successful update, save the validated extraction inventory (without its optional migration section) to _meta/symbols.json; refresh fallback_languages from that report. For a reviewed backend/version migration, adopt the report's symbol_backend only after all affected headings and references are reconciled. Never publish new backend metadata or replace a good cache after a failed extraction or incomplete migration.

json
{
  "version": 1,
  "initialized_at": "<preserved>",
  "last_update_at": "<now ISO>",
  "last_commit": "<full 40-char HEAD SHA>",
  "last_update_type": "init|auto|manual|dream|meditate",
  "total_files": N,
  "total_symbols": N,
  "total_discoveries": N,
  "dream_cycles_completed": <preserved>
}

Refresh _index.md with current counts.

Discovery Writing Rules

See /shadow-frog § Discovery Format for the verbatim per-file, cross-cutting, and preference formats. Rules to keep in mind during update sessions:

  • Start new claims/preferences with citation_score: 0; preserve the score when updating the same knowledge. Citation-only edits do not add discoveries.
  • Record deliberately consulted existing entries once per task using the core shadow-cite.py helper, not a retrieval requirement or a second hidden store.
  • Be behavioral: "silently returns None on expired tokens" not "handles token expiration"
  • source: user and source: interaction → always verified, use user's own words
  • source: exploration → mark uncertain unless verified by code reading or tests
  • If 3+ files involved → create in _cross/<slug>.md instead, add back-pointers
  • If project-wide preference with no file reference → write to _prefs.md
  • Slug naming: kebab-case derived from title (e.g., "Token expiry config split" → token-expiry-config-split.md)

Heefeg gestallte Froen

Wat mécht de KI-Skill Shadow Frog Update?

Update the shadow knowledge base after code changes and from conversational insights. Detects what changed via git diff, refreshes per-file shadows, captures knowledge shared by the user during the session, and updates cross-cutting discoveries. Invoke manually with /shadow-frog-update; the preToolUse hook will remind the agent when the shadow is behind HEAD.

Firwat Shadow Frog Update op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Shadow Frog Update besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Shadow Frog Update an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-update an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Shadow Frog Update benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Shadow Frog Update benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Shadow Frog Update domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Shadow Frog Update gratis?

Jo. De Skill gëtt vum microsoft ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇