Save

From divad12/dotfiles · View interactive version

Save is an AI agent skill from the GitHub repository divad12/dotfiles. Save session progress: update PROGRESS.md coordination board, route learnings to docs, update TECH_DEBT.md.

How to use this skill

Skill file

Save

Update PROGRESS.md as a coordination board, route any learnings to the right documentation, and update TECH_DEBT.md if relevant.

Steps

1. Update PROGRESS.md

PROGRESS.md is a coordination board for tracking work across agents, sessions, and worktrees. It answers: what's being worked on, what's next, and what's done recently.

Read the existing PROGRESS.md. Update it in place following this format:

# Progress

## Last Updated
[Date]

## Current State
One-liner about where things are overall.

## In Progress
- [ ] [worktree: branch-name] Task description (spec: docs/specs/foo.md)
- [ ] [worktree: other-branch] Another task

## Up Next
- [ ] Next task to pick up
- [ ] Another upcoming task

## Recently Done
- [x] Completed task (spec: docs/specs/bar.md)
- [x] Another completed task

## Blockers
None.
Update rules
What does NOT go in PROGRESS.md

2. Update TECH_DEBT.md (if relevant)

If this session introduced, resolved, or affected any tracked debt, update TECH_DEBT.md:

If nothing changed, skip this step.

TECH_DEBT.md format

Organize by priority:

Each entry should have: Where (file path + line if relevant), Issue (what's wrong), Fix (how to resolve).

When to add entries (not just at save time)
When to consult TECH_DEBT.md

3. Capture learnings

Run the /learn skill for each learning from this session. This generalizes specific fixes into durable principles and routes them through the learning dashboard before promotion.

If the session was genuinely trivial (one-line typo fix, config change) with nothing to capture, skip this step.

4. Check skill trigger coverage (if docs/ai/ exists)

If the project has a docs/ai/ directory and .claude/skills/ (or .agents/skills/), quickly check: did this session create any new directories or file patterns that aren't covered by existing skill descriptions? If so, note it in the save output so the user can decide whether to update skill triggers.

5. Auto-sync the architecture diagram (if docs/ai/architecture.md exists)

If docs/ai/architecture.md exists and has a ## This diagram covers section, check for drift and fix it automatically:

  1. Parse the coverage paths from that section (list of globs like src/app/api/**)
  2. Run git diff --name-status main...HEAD (and working tree) scoped to those paths
  3. Filter for structural changes: A (added files), D (deleted files), R (renamed files). Ignore M (modifications to internals).
  4. Also check if docs/ai/architecture.md itself was modified this session

If there are structural changes under covered paths AND architecture.md was NOT already updated this session:

If architecture.md WAS already modified this session, the user handled it manually. Skip.

If there are no structural changes, skip silently.

Rules

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.