Pensieve sync to main

From kingkongshot/Pensieve · View interactive version

Pensieve sync to main is an AI agent skill from the GitHub repository kingkongshot/Pensieve. Sync Pensieve's Chinese development/release branch into the English main branch. Use in the Pensieve repository when the user asks to sync zh or experimental to main, publish the English branch, translate Pensieve README/tool specs/templates/SKILL.md, or run the zh-to-main release flow. Do not use f

How to use this skill

Skill file

Pensieve Sync to Main

Use only inside the Pensieve repository itself.

This skill syncs changes from experimental or zh into main, preserves contributor history, and ensures main remains the English release branch. This is a maintainer release flow, not a default pipeline that should be seeded into every Pensieve user project.

Hard Rules

Branch Strategy

Default source branch is zh unless the user explicitly specifies experimental. Default remote is kingkongshot.

Translation Scope

Chinese content in these files must be translated into English:

These files are synced directly by default; translate only if user-visible Chinese appears on the English branch:

Workflow

1. Confirm scope

  1. Check current state:

```bash

git branch --show-current

git status --short

git remote -v

```

  1. Confirm source branch:

```bash

git fetch kingkongshot

git diff --stat main..kingkongshot/<source-branch>

```

  1. Classify changed files as: needs translation, direct sync, deletion, binary/config.
  2. If the worktree has unrelated local changes, report them before switching branches.

2. Create sync branch

  1. Start from latest main:

```bash

git checkout main

git pull kingkongshot main

git checkout -b sync/zh-to-main-<date>[-topic]

```

  1. Merge the source branch to preserve history:

```bash

git merge kingkongshot/<source-branch> -X theirs --no-edit

```

  1. If the user explicitly asks to sync only a few files, use targeted checkout:

```bash

git checkout kingkongshot/<source-branch> -- <file>

```

  1. Resolve conflicts before translating.

3. Translate

Rules:

Validation:

rg -n --pcre2 '\p{Han}' README.md SKILL.md .src docs

After translation, results may only include intentionally retained Chinese, such as language-switch links or bilingual regexes.

4. Validate, commit, and open PR

  1. Run checks that exist in the current repository:

```bash

git diff --check

```

  1. Commit:

```bash

git add -A

git commit -m "translate: sync <source-branch> to main"

```

  1. Push and create a PR:

```bash

git push kingkongshot sync/zh-to-main-<date>[-topic]

gh pr create --repo kingkongshot/Pensieve --base main --head sync/zh-to-main-<date>[-topic]

```

  1. Unless the user explicitly delegated the full release flow, ask for confirmation before merging the PR.

Failure Fallback

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.