Skip to content

Dtoms afspeckit refactor#11

Merged
dtoms merged 8 commits intoaf-mainfrom
dtoms-afspeckit-refactor
Apr 18, 2026
Merged

Dtoms afspeckit refactor#11
dtoms merged 8 commits intoaf-mainfrom
dtoms-afspeckit-refactor

Conversation

@dtoms
Copy link
Copy Markdown
Collaborator

@dtoms dtoms commented Apr 18, 2026

No description provided.

dtoms and others added 8 commits April 13, 2026 16:28
Replace placeholder TODO hooks with real implementations:

- before-specify: branch detection, main/master block, PRD detection,
  direct invocation of git create-new-feature.sh with GIT_BRANCH_NAME
- before-plan/tasks: spec-picker guard + semantic search dispatch (overview)
- before-implement: spec-picker guard + semantic search dispatch (full)
- before-analyze/checklist/clarify: spec-picker guard (no search)
- before-constitution/taskstoissues: common pre-flight + constitution
- after-specify: feature.json repair, staged artifact relocation
- after-* (all others): next-step suggestions via after-common

New shared utilities:
- speckit.af.common.md: version check + plugin root resolution (session-cached)
- speckit.af.after-common.md: state-based next-step suggestions
- speckit.af.spec-picker.md: feature.json guard (full) + resolve-only mode
- check-version.sh: CLI version compatibility check

All hooks use cross-platform stat (BSD/GNU). Semantic search dispatches
to /appfolio-speckit:speckit.af.semantic.search with graceful degradation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Init changes:
- --force now threads through to _install_shared_infra and
  install_af_extensions, overwriting init-managed files while
  preserving user content (memory/, feature.json, semantic-specs/)
- AF extensions install before git so AF hooks register first and
  fire before git hooks at each lifecycle phase
- Git added to AF_EXTENSION_IDS for unconditional install with
  latest hook files regardless of --no-git flag
- _cleanup_copilot_files removes extension-registered Copilot
  agent/prompt files since AF only uses Claude

agents.py:
- disable-model-invocation set to false so lifecycle hooks can
  dispatch plugin skills programmatically

Removed:
- specify-af upgrade command (redundant with --force reinit)
- upgrade_af_extensions() dead code in af_init.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Templates (all 9 commands):
- Hooks now execute sequentially in YAML array order instead of
  being presented individually
- Mandatory hooks (optional: false) fire via EXECUTE_COMMAND
- Optional hooks collected and presented as numbered list with
  skip option
- Internal AF hooks (speckit.af.before-*/after-*) filtered from
  user-facing optional hook list
- specify.md defers empty-argument error until after before-hooks
  run, allowing PRD detection to provide context
- plan.md agent context update skipped when AF extension installed

Branch validation:
- check_feature_branch() disabled in both common.sh and
  git-common.sh — feature.json is the source of truth for feature
  directory resolution, GIT_BRANCH_NAME allows arbitrary branch
  names, main/master blocking handled by AF before-specify hook

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
conftest.py:
- Fixed AF_EXTENSION_COMMANDS: added af.common, af.after-common;
  removed af.check-version (not a registered command)
- Added check-version.sh to AF_EXTENSION_FILES
- Added GIT_EXTENSION_COMMANDS and GIT_EXTENSION_FILES for git
  extension now installed unconditionally via AF_EXTENSION_IDS

Base test classes (markdown, skills, toml):
- Include GIT_EXTENSION_FILES and git commands in _expected_files()

Copilot test:
- Removed AF/git extension copilot agent/prompt expectations
  (deleted by _cleanup_copilot_files during init)

Generic test:
- Added GIT_EXTENSION_FILES (no command dir registration)

CLAUDE.md:
- Documented 17 excluded tests with reasons — all are intentional
  fork changes (disabled branch validation, model invocation,
  copilot cleanup, force overwrite, unconditional git install)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Expanded What's Changed table with new fork divergences:
  model invocation, branch validation, constitution loading,
  hook presentation, specify empty args, agent context update
- Added Hook Architecture section documenting the loose callback
  structure between extension hooks and Claude Code plugin
- Removed redundant Conflict-Prone Files section (now covered by
  the file column in What's Changed table)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded domain logic (semantic search, PRD detection,
artifact relocation, next-step suggestions) in AF extension hooks
with generic dispatch to appfolio-speckit plugin via hooks.yml +
speckit-hooks/{phase}.md. Domain logic now lives in the plugin,
allowing new domains to be added without touching spec-kit.

Remove all optional speckit.git.commit hooks from git extension —
commit discipline is managed via /speckit.af.commit.per.task instead.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… to AskUserQuestion

- integrations/claude/__init__.py: remove stale .claude/commands/speckit.*.md files
  on init so pre-fork installs don't shadow the current skill set
- speckit.af.spec-picker.md: replace plain numbered list with AskUserQuestion tool
  for blocking spec selection
- FORK.md: document stale command cleanup in init flow

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@dtoms dtoms merged commit c2c2046 into af-main Apr 18, 2026
2 of 5 checks passed
@dtoms dtoms deleted the dtoms-afspeckit-refactor branch April 18, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant