AgentSkillsCN

repo-project-sync-workflow

在 KINTSUGI 中,采用 SNAKE 与 RASTER 的拼接方式,灵活应对图像拼接需求。

SKILL.md
--- frontmatter
name: repo-project-sync-workflow
description: "When editing KINTSUGI notebook modules (Kdecon, Kstitch, Kreg, etc.), always edit the main repo first then sync to project folders"
author: Claude Code
date: 2025-12-17

KINTSUGI Repository-to-Project Sync Workflow

Experiment Overview

ItemDetails
Date2025-12-17
GoalEstablish correct workflow for editing shared notebook modules
EnvironmentKINTSUGI multi-project setup with shared codebase
StatusSuccess

Context

KINTSUGI uses a shared codebase model where:

  • Main repo: /blue/maigan/smith6jt/KINTSUGI/ contains the source code
  • Project folders: /blue/maigan/smith6jt/KINTSUGI_Projects/.../notebooks/ contain working copies

Project folders sync FROM the main repo. If you edit a project folder directly, those changes will be overwritten when the user syncs from the main repo.

Verified Workflow

CORRECT: Edit Main Repo First

bash
# 1. Make edits to the main repo
/blue/maigan/smith6jt/KINTSUGI/notebooks/Kdecon/deconvolution.py

# 2. User syncs to project folder (or you can do it)
cp /blue/maigan/smith6jt/KINTSUGI/notebooks/Kdecon/*.py \
   /blue/maigan/smith6jt/KINTSUGI_Projects/.../notebooks/Kdecon/

Key Paths

ComponentMain Repo PathProject Folder Path
KDeconKINTSUGI/notebooks/Kdecon/KINTSUGI_Projects/.../notebooks/Kdecon/
KstitchKINTSUGI/notebooks/Kstitch/KINTSUGI_Projects/.../notebooks/Kstitch/
KregKINTSUGI/notebooks/Kreg/KINTSUGI_Projects/.../notebooks/Kreg/
Kview2KINTSUGI/notebooks/Kview2/KINTSUGI_Projects/.../notebooks/Kview2/
src/kintsugiKINTSUGI/src/kintsugi/N/A (installed package)

Failed Attempts (Critical)

AttemptWhy it FailedLesson Learned
Editing project folder firstUser synced from main repo, overwriting all changesAlways edit main repo first
Copying project→main after editCreates confusion about source of truthMain repo is ALWAYS the source

Key Insights

  • The main repo (/blue/maigan/smith6jt/KINTSUGI/) is the single source of truth
  • Project folders are working copies that get synced FROM main repo
  • After editing main repo, remind user to sync OR sync for them
  • When user reports a fix "didn't work", check if they synced (overwriting your changes)
  • Jupyter kernels cache imports - remind user to restart kernel after sync

Trigger Conditions

This skill applies when:

  • Editing any file in KINTSUGI/notebooks/ subdirectories (Kdecon, Kstitch, Kreg, Kview2, etc.)
  • User mentions syncing or copying files between repos
  • A fix "doesn't work" after being applied
  • Working with KINTSUGI_Projects folders

References

  • KINTSUGI CLAUDE.md development workspace section
  • VS Code multi-root workspace: kintsugi-dev.code-workspace