Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All files listed below are modified from upstream and will likely conflict on me
| Package name | `specify-cli` → `specify-af-cli` | `pyproject.toml` |
| Binary name | `specify` → `specify-af` | `pyproject.toml` |
| Catalog URL | Points at `appfolio/spec-kit` `af-main` branch | `src/specify_cli/extensions.py`, `extensions/catalog.json` |
| Init flow | Auto-installs bundled AF extensions after scaffold. `--force` now overwrites init-managed files (scripts, templates, extensions, skills) while preserving user content (`memory/`, `feature.json`, `semantic-specs/`). Cleans up stale `.claude/commands/speckit.*.md` files from pre-fork installs | `src/specify_cli/__init__.py`, `src/specify_cli/integrations/claude/__init__.py` |
| Init flow | Auto-installs bundled AF extensions after scaffold. `--force` now overwrites init-managed files (scripts, templates, extensions, skills) while preserving user content (`memory/`, `feature.json`, `semantic-specs/`). Cleans up stale `.claude/commands/speckit.*.md` files from pre-fork installs and known-removed AF skill dirs under `.claude/skills/` (e.g. `speckit-af-check-version`, `speckit-af-after-common`) which Claude Code would otherwise auto-discover and use to hijack lifecycle dispatch | `src/specify_cli/__init__.py`, `src/specify_cli/integrations/claude/__init__.py` |
| Removed command | `specify-af upgrade` removed — redundant with reinit flow | `src/specify_cli/__init__.py` |
| Version resolution | Uses `packages_distributions()` instead of hardcoded package name | `src/specify_cli/__init__.py` |
| Release workflow | release-please with `af-v*` tags on `af-main` | `.github/workflows/release.yml` |
Expand Down
19 changes: 19 additions & 0 deletions src/specify_cli/integrations/claude/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import shutil
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -166,6 +167,24 @@ def setup(
for stale in commands_dir.glob("speckit.*.md"):
stale.unlink()

# Clean up legacy AF skill directories that were shipped in earlier
# versions of the fork but have since been removed or consolidated.
# --force only overwrites current files; directories whose matching
# bundle content no longer exists survive unless explicitly pruned.
# Claude Code auto-discovers these via skill descriptions, which can
# hijack lifecycle dispatch (e.g. a stale speckit-af-check-version
# skill intercepts VERSION_FAIL handling that now lives in common.md).
legacy_af_skills = (
"speckit-af-check-version", # replaced by inline VERSION_FAIL branch in common.md
"speckit-af-after-common", # never had a SKILL.md; empty dir leftover
)
skills_root = project_root / ".claude" / "skills"
if skills_root.is_dir():
for legacy in legacy_af_skills:
legacy_dir = skills_root / legacy
if legacy_dir.is_dir():
shutil.rmtree(legacy_dir)

# Post-process generated skill files
skills_dir = self.skills_dest(project_root).resolve()

Expand Down
Loading