Skip to content

Pulling base updates

A licensee fork isn’t a one-time grab. Every time the base (ddakit/book-studio) adds a new skill, fixes a hook, or updates the 4-Tier rules or gate categories in AI_AUTOMATION.md, that change has to reach the fork for the license value to hold. /update-from-base is the spot that lets you receive it safely without knowing git rebase.

Auto-applicable, never touched, decided by a human. The fork between these three is the heart of it.

PathWhat
.claude/skills/{base-skill-name}/base skills (start, book-orchestrator, the writing skills, ai-pattern-check, continuity-check, etc.)
.claude/agents/*.mdthe 4 agents (direction, planning, writing, quality)
.claude/hooks/*.sh, .claude/settings.jsonbase hooks and their registration
AI_AUTOMATION.mdthe domain SSOT (4-Tier definitions, book_type routing, the 14 categories, S1–S8)
.gitignorebase standard (the _workspace/ exclusion)

The rule is not to edit base skill bodies directly. To add your own skill, make it in a separate directory.

PathWhat
_workspace/{book_slug}/, _workspace/books.jsonthe manuscripts, outlines, and progress of every book in progress
.envAPI keys (when using research, illustration)
.claude/agent-memory/, .claude/state/, .claude/session-state/memory, runtime, session handoff
LICENSE, COMMERCIAL-LICENSE.mdlicense

Every book in progress is user-owned, so updates don’t touch the manuscripts. It’s the spot where chapters don’t get wiped out even when the base updates.

CLAUDE.md, AGENTS.md, README.md — three. Because edits from both the base and the user can land in them, they aren’t auto-updated; it shows the diff and asks. README.md is a spot a fork user can append their own book info to, so overwriting it wholesale would erase the user’s notes.

Calling /update-from-base or “pull base updates” goes through the following.

  1. Check for dirty with git status --porcelain. If there are unsaved changes, suggest git stash
  2. git fetch base main
  3. Classify changed files by area with git diff --name-status <last_synced_commit>..base/main
  4. Summarize the base-owned changes. N new skills, M updated hooks, whether AI_AUTOMATION.md changed
  5. On a user yes, apply only the base-owned paths
  6. Handle mixed files one at a time, choosing among three options (overwrite wholesale, 3-way merge, defer)
  7. Verify after applying and suggest a commit

For one-time setup, registering the base as a git remote is guided automatically by the first call.

Terminal window
git remote add base https://github.com/ddakit/book-studio.git

The state file goes in .claude/state/base-upstream.json, and it looks only at the changes from last_synced_commit to base/main.

When there’s a trace of you editing a base skill

Section titled “When there’s a trace of you editing a base skill”

If you’ve ever modified a file under .claude/skills/{base-skill}/ in a commit (detected via git log), that file is treated as mixed rather than base-owned, because auto-overwriting would erase your work. To avoid this, don’t edit the base skill directly; make a separate skill with the same trigger keywords in your own directory.

The same procedure followed at a beginner pace is in beginner updates.