norbertsuski/sdd-toolkit/sdd-archive-project

Claude Code and agent skill by norbertsuski/sdd-toolkit

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Archive a completed project by moving its foundation/<slug> folder into context/<app>/foundation/archive/ and stamping roadmap.md with archived status

Install

npx vskill@latest install norbertsuski/sdd-toolkit/sdd-archive-project

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as norbertsuski/sdd-toolkit/sdd-archive-project.

/sdd-archive-project — Close a Project

Move a completed project's foundation folder from context/<app>/foundation/<project-slug>/ to context/<app>/foundation/archive/<created-date>-<project-slug>/ (the same app's foundation archive), stamp roadmap.md frontmatter with status: archived + archived_at, use git mv so file history follows, and commit.

This is the project-level sibling of /sdd-archive. Where /sdd-archive closes a single change (changes/<change-id>/), this closes an entire project — its shape-notes.md, prd.md, roadmap.md, and any prd-vN.md versioned saves — once all its work is done.

<app> is the resolved workspace directory's name (e.g. assets, campaigns, crm); it is derived from the resolved foundation-folder path (see "Resolution"). Repos with no workspace layout keep the flat context/foundation/… layout — drop the <app> segment from every path below.

The gate is lenient warn-only with three hard blocks: uncommitted edits inside the project folder, pre-existing staged changes anywhere, and any in-flight change still pointing at this project (archiving would orphan it). Everything else — unfinished roadmap slices, open PRD questions — is surfaced as a warning followed by a confirmation prompt; the user can still archive.

After archiving, other sdd skills refuse to write inside context/*/foundation/archive/… — archived projects are read-only by convention.

Initial Response

When this command is invoked:

  1. An argument was provided → parse it (see "Argument Parsing") and proceed to "Resolution".
  2. No argument → respond with this message and STOP:
I'll archive a completed project. Please provide a project slug or path:
Examples:
/sdd-archive-project brickworks-preview-panel
/sdd-archive-project @context/assets/foundation/brickworks-preview-panel/
List active projects with: `ls -d context/*/foundation/*/ | grep -v /foundation/archive/`

Then wait for the user to provide an argument.

Argument Parsing

Take the first whitespace-delimited token. Normalize:

  1. Strip a leading @ if present.
  2. Strip a trailing / if present.
  3. If the result contains /, take the last non-empty path segment.

The result is <project-slug>.

Resolution

  1. Resolve <project-slug> to a foundation folder. If the argument was a full path, it reveals the root directly — use it. Otherwise discover every context root per ../sdd-shape/references/context-resolution.md (find each context/.sdd.yml, excluding vendor/build dirs) and search each root for <CONTEXT_ROOT>/foundation/<project-slug>/ — a flat root R checks R/foundation/<project-slug>/; a legacy root R checks each R/<app>/foundation/<project-slug>/. Never match under …/foundation/archive/…. Repos predating the .sdd.yml marker fall back to the legacy globs context/*/foundation/<project-slug>/ and flat context/foundation/<project-slug>/. A valid project folder contains at least one of shape-notes.md, prd.md, roadmap.md.
  • Exactly one match (across all roots) → use it. Set CONTEXT_ROOT to that root (and derive <app> when the match is a legacy root — every context/<app>/… path below then reads as $CONTEXT_ROOT/…).
  • More than one match → the same slug exists under multiple roots/apps. Ask the user which to archive, then proceed with the chosen path.
  • Zero matches → it may already be archived. Check every discovered root's foundation/archive/*-<project-slug> (plus the legacy fallback context/*/foundation/archive/*-<project-slug>) for a directory whose name ends with -<project-slug>. If found, print error: project "<project-slug>" is already archived at <path>. and STOP. Otherwise print error: no project folder named <project-slug> found under any discovered context root. Run ls -d "$CONTEXT_ROOT"/foundation/*/ | grep -v /foundation/archive/ (per root) to list active projects. and STOP.

_(Flat roots have no <app> segment — drop it from every context/<app>/… path in the rest of this skill, exactly as the header note says.)_

Hard blocks

Three pre-flight checks. Any failing blocks the archive.

1. Uncommitted edits inside the project folder. Run git status --porcelain "context/<app>/foundation/<project-slug>/". If output is non-empty, block and print:

✗ Cannot archive: context/<app>/foundation/<project-slug>/ has uncommitted changes.
<one line per offending path>
Commit or stash them first, then re-run /sdd-archive-project.

2. Pre-existing staged changes anywhere. The archive commit bundles whatever is staged. Run git diff --cached --quiet. If exit code is non-zero, block and print:

✗ Cannot archive: pre-existing staged changes would be bundled into the archive commit.
<output of `git diff --cached --name-only`>
Commit them first or `git reset` to unstage, then re-run /sdd-archive-project.

3. In-flight changes still pointing at this project. Glob context/<app>/changes/*/change.md. For each, read its frontmatter change_id: and status:, and detect whether the change belongs to this project by either signal:

  • Change-ID match (primary — the family's standard link, same as `/sdd-archive`): the project's roadmap.md (if it exists) has an item whose Change ID equals this change_id exactly.
  • `roadmap:` frontmatter (secondary, when present): a roadmap: field that resolves to this project's context/<app>/foundation/<project-slug>/roadmap.md. (No shipped skill writes this field today; honor it if a workflow added it by hand.)

If either signal matches and status: is not archived, collect that change-id. If any were collected, block and print:

✗ Cannot archive: these active changes still point at this project:
<change-id> (status: <status>)
...
Finish and /sdd-archive each of them first — archiving the project now would orphan them.

Either check 1/2 failing, or a non-empty list in check 3 → STOP. These are hard blocks; do not proceed to the warn prompt.

If git is not available or the repo is not a git repo, print warning: not a git repository — skipping uncommitted-changes blocks. and continue (checks 1–2 skipped; check 3 still runs — it reads files, not git). Archive still works without git; we just lose history-preservation via git mv and skip the commit step.

Soft warnings (non-blocking)

Collect these, then present all at once with a single confirmation prompt.

  1. Unfinished slices: if roadmap.md exists, parse its ## At a glance table and count rows whose Status column is not done. If any, queue: <N> roadmap slices not done: <comma-separated "<Change ID> (<Status>)" tokens, truncated to 5 with "…">.
  2. Open PRD items: if prd.md exists, check its ## Open Questions section for entries and scan for # TODO markers. If any remain, queue: PRD still has <N> open item(s) (Open Questions / TODO).
  3. No roadmap: if roadmap.md is absent, queue: Project has no roadmap.md — it was never roadmapped.

If at least one warning was queued, print:

⚠ /sdd-archive-project warnings for <project-slug>:
- <warning 1>
- <warning 2>

Then ask (use the interactive prompt mechanism):

  • question: Archive project "<project-slug>" anyway?

header: Archive project options:

  • label: Continue archiving

description: Move foundation/<project-slug>/ to foundation/archive/ despite the warnings.

  • label: Cancel

description: Don't archive. Exit cleanly. multiSelect: false

  • Continue archiving → proceed to "Move and stamp".
  • Cancel → print Cancelled. Project unchanged. and STOP.

If no warnings were queued, skip the prompt and proceed directly.

Move and stamp

  1. Compute the archive destination.
  • DATE = the project's created date: read created: frontmatter from shape-notes.md, else roadmap.md, else prd.md (first that exists and has a YYYY-MM-DD value). If none is found, use today: date -u +%F.
  • DEST="context/<app>/foundation/archive/${DATE}-<project-slug>".
  • If $DEST already exists, print error: archive destination "<DEST>" already exists. Inspect manually. and STOP.
  1. Stamp `roadmap.md` (in place, before the move; skip this step if the project has no roadmap.md):
  • Set status: archived.
  • Set archived_at: <ISO-8601 datetime, today, UTC> — date -u +"%Y-%m-%dT%H:%M:%SZ".
  • Set updated: <today as YYYY-MM-DD>.
  • Edit only these three frontmatter lines. Leave created, version, main_goal, etc. alone. If status:/archived_at: keys are absent from the frontmatter, add them.
  1. Move the folder.
  • Prefer git mv "context/<app>/foundation/<project-slug>" "$DEST" so history follows.
  • If git mv fails, fall back to mkdir -p "context/<app>/foundation/archive" then mv "context/<app>/foundation/<project-slug>" "$DEST". Print a warning if the fallback was used.
  • Confirm post-move: [ -d "$DEST" ] && [ ! -d "context/<app>/foundation/<project-slug>" ]. If either fails, print a diagnostic and STOP.
  1. Stage the stamp into the rename (only if roadmap.md exists): git add "$DEST/roadmap.md" so the frontmatter stamp lands in the same commit as the rename.
  1. Commit.

``bash git commit -m "$(cat <<'EOF' chore(<app>): archive project <project-slug> EOF )" ``

The scope is the `<app>` the project lives under (e.g. chore(assets): archive project brickworks-preview-panel). This repo's commitlint enforces a fixed scope list of package/app names and rejects a literal archive scope, so the app is the correct, accepted scope. (Flat-layout repos with no scope-enum may use chore(archive): archive project <project-slug>.) Never pass --no-verify or signing-bypass flags; if a pre-commit hook fails, fix the cause and create a new commit. Skip this step entirely if git is unavailable.

  1. Print confirmation:
✓ Archived project <project-slug>
context/<app>/foundation/<project-slug>/ → <DEST>/
roadmap.md updated: ← print this block only if the project had a roadmap.md
status: archived
archived_at: <ISO datetime>
updated: <today>
Committed as: <short SHA> chore(<app>): archive project <project-slug>
The folder is now read-only by convention.

Error handling

  • Any unexpected filesystem error during the move leaves the source folder in place; the roadmap.md stamp lands before the move, so on partial failure you may see status: archived in context/<app>/foundation/<project-slug>/roadmap.md while the folder is still under foundation/. Inspect manually; re-running is safe (Resolution detects the already-archived copy).
  • Do NOT attempt rollback — the stamp is intent-marking and partial state is recoverable by hand.

What this skill does NOT do

  • Does not close roadmap items — the whole roadmap moves with the project; there is no per-item flip like /sdd-archive does.
  • Does not touch the app-level change archive context/<app>/archive/ — that is /sdd-archive's domain. This skill only writes under context/<app>/foundation/archive/.
  • Does not archive individual changes — run /sdd-archive <change-id> for those first (hard block 3 enforces this).
  • Does not push. The archive commit lands locally; git push is the user's call.
  • Does not run tests/build as a gate — the gate is lenient warn-only by design.
  • Does not unarchive. To revisit an archived project, reference the archived folder for context.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/norbertsuski/sdd-toolkit/sdd-archive-project/badge)](https://verified-skill.com/skills/norbertsuski/sdd-toolkit/sdd-archive-project)

Something wrong with this skill or its page? Tell us.