Files
auto-build/plugin/commands/spec.md
Marius Mutu 940c6a9f58 feat: Move specs and memory to git for multi-developer collaboration (v1.0.6)
BREAKING CHANGE: Specs, plans, and memory moved from .auto-build-data/ (gitignored)
to .auto-build/ (git-tracked) to enable team collaboration.

Changes:
- Specs/plans now in .auto-build/specs/ (shared with team)
- Memory (patterns, gotchas) now in .auto-build/memory/ (shared with team)
- .auto-build-data/ now only contains local data (worktrees, cache)
- Added /ab:migrate command for existing projects
- Removed symlinks from worktree-create.sh (no longer needed)

Benefits:
- Any developer can continue a plan started by another
- Patterns and gotchas shared across team
- Works on Windows/Linux/Mac without symlinks
- Full version history in git

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 17:44:52 +02:00

3.3 KiB

description, argument-hint
description argument-hint
Create detailed feature specification <feature-name> [description]

Create Feature Specification

Create a comprehensive specification for a new feature using the spec-writer agent.

Input

  • Feature name: First word of $ARGUMENTS (required)
  • Description: Rest of $ARGUMENTS (optional, will prompt if missing)

Workflow

1. Initialize

  • Parse feature name from arguments (kebab-case: "User Dashboard" -> "user-dashboard")
  • Check if .auto-build/ exists in the project root
    • If not: Create the directory structure:
      mkdir -p .auto-build/specs
      mkdir -p .auto-build/memory
      
  • Check if spec already exists at .auto-build/specs/{feature-name}/
    • If exists: Ask "Update existing spec or create new version?"

2. Gather Requirements

Ask the user these questions (one at a time, adapt based on answers):

  1. Problem Statement "What problem does this feature solve? Who are the users?"

  2. Success Criteria "How will we know this feature is complete? What are the acceptance criteria?"

  3. Constraints "Are there any constraints? (performance, compatibility, existing patterns to follow)"

  4. Scope "What is explicitly NOT included in this feature?"

3. Codebase Analysis

Launch the spec-writer agent with:

  • Feature name and description
  • User's answers to requirements questions
  • Instruction to analyze the codebase for:
    • Similar existing features
    • Patterns to follow
    • Files likely to be affected
    • Dependencies and integrations

4. Generate Specification

The spec-writer agent creates:

  • .auto-build/specs/{feature-name}/spec.md using the template
  • .auto-build/specs/{feature-name}/status.json with state: "SPEC_COMPLETE"

5. Confirmation

Display:

Specification created: .auto-build/specs/{feature-name}/spec.md

Summary:
- [Key requirement 1]
- [Key requirement 2]
- [Key requirement 3]

Affected files identified: X files
Estimated complexity: [Low/Medium/High]

Next steps:
- Review the spec: Read .auto-build/specs/{feature-name}/spec.md
- Start implementation: /ab:build {feature-name}
- Commit to share with team: git add .auto-build/ && git commit -m "spec: {feature-name}"

Spec Template

The generated spec.md follows this structure:

# Feature: {name}

## Overview
Brief description and purpose

## Problem Statement
What problem this solves

## User Stories
- As a [user], I want [action] so that [benefit]

## Functional Requirements
1. [Requirement 1]
2. [Requirement 2]

## Technical Requirements
- Files to modify: [list]
- New files to create: [list]
- Dependencies: [list]
- Database changes: [if any]
- API changes: [if any]

## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2

## Out of Scope
What is NOT included

## Risks and Mitigations
| Risk | Mitigation |
|------|------------|

## Open Questions
- [Any unresolved questions]

Status JSON Format

{
  "feature": "feature-name",
  "status": "SPEC_COMPLETE",
  "created": "2025-01-15T10:00:00Z",
  "updated": "2025-01-15T10:30:00Z",
  "history": [
    {"status": "SPEC_DRAFT", "at": "2025-01-15T10:00:00Z"},
    {"status": "SPEC_COMPLETE", "at": "2025-01-15T10:30:00Z"}
  ]
}