mcpField
C
cs-build-resync-codebase

cs-build-resync-codebase

github.com/codespringappDevelopment153 installsUpdated 4w ago
Repository

About cs-build-resync-codebase

A CodeSpring skill for checking project documentation against the current code and Git history. It reports differences and updates CodeSpring records while keeping the codebase read-only.

Key features

  1. 01Compare code and Git history with CodeSpring
  2. 02Review features, notes, PRDs, and tech stack
  3. 03Report drift with severity and references
  4. 04Update CodeSpring without changing code

Use cases

  1. 01Reconcile project records after implementing a feature
  2. 02Identify stale routes, data models, or technical notes
  3. 03Refresh PRDs when implementation changes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/codespringapp/codespring-skills --skill cs-build-resync-codebase

After installing, type/cs-build-resync-codebasein Claude Code to confirm it loaded.

Details

From the project README

Re-sync CodeSpring with the codebase

Once a feature is built, it rarely matches the original plan exactly. This skill checks CodeSpring against the current code and brings the map/notes/PRDs back into line.

Guardrail: this is read-only on the codebase. It reads code and git history and writes ONLY to CodeSpring (features, notes, PRDs). Never modify application code from this skill.

Uses: codespring skill references (analyze-codebase.md, mindmap-structure.md, prd-management.md, pitfalls.md).

0. Connect first

codespring auth status + codespring status (LOCAL project; print it).

1. Establish what changed

  • Read recent changes: git log, git diff since the last sync point (or a branch/tag the user names), and the current state of the relevant files. If a GitHub remote is set, the mindmap's githubUrl and the repo are the reference.
  • Focus on the feature(s) the user built, but scan for new routes, tables, jobs, env vars, and shared systems anywhere.

2. Compare code ↔ CodeSpring

For each affected feature, diff reality against what's documented:

  • Features / sub-features — any new capability in the code not represented as a feature/sub-feature? Any documented one that no longer exists?
  • Notes — does the "how it works" note still describe the real flow, files, and routes?
  • PRDs — do the Frontend/Backend PRDs still match? Especially the shared backend contracts (routes, data model, auth/RLS, jobs/cron, storage/buckets, payments/credits, env vars) and the dependency map.
  • Tech stack — any new dependency/service to add.

3. Report first

Summarize as: up to date / minor tweaks / stale, with a short list of concrete diffs (each with file/route/table references and a severity). Let the user confirm before large rewrites.

4. Update CodeSpring (writes go here, not to code)

  • Add/adjust features & sub-features (codespring feature create --parent ..., feature update ...), keeping the node-features count correct (re-parent if flattened — see pitfalls.md).
  • Refresh notes (codespring mindmap note ...).
  • Refresh PRDs: regenerate via cs-build-create-prd where a PRD is materially stale, or codespring prd sync <id> --file for targeted content updates.
  • Update tech stack / project info if needed.

5. Confirm

List what was updated in CodeSpring and give the project link. Note anything you intentionally left (e.g. a planned-but-not-built task).

What good looks like

  • CodeSpring reflects what the code actually does now, not just the original plan.
  • Drift is reported by severity with exact references before anything is rewritten.
  • The codebase was never modified — only CodeSpring was updated.

Comments

Markdown supported