This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Specware is a CLI tool that enables spec-driven development workflows for Claude Code AI Coding Assistant. It creates structured directories and templates to facilitate feature specification and implementation planning with integrated status tracking.
# Build the project
make build
# Run all tests (unit and integration suites)
make test
# Run tests directly with go (unit and integration)
go test ./...
# Run specific test suites
go test ./internal/spec # Unit tests only
go test ./tests # Integration tests only
# Clean build artifacts
make clean
# Run the built binary
./specware <command>The project follows a standard Go CLI structure using Cobra for command handling:
main.go- Entry point that callscmd.Execute()cmd/- Cobra command definitionsroot.go- Root command setup and subcommand registrationinit.go- Project initialization commandlocalize_templates.go- Template localization commandfeature.go- Feature management commands with status tracking
internal/spec/- Core business logic for spec-driven workflows- Handles project initialization with
.claude/commands,.claude/agentsand.specdirectories - Manages embedded asset copying (commands, agents and templates)
- Provides feature numbering and directory structure management
- Implements status tracking through
.spec-status.jsonfiles
- Handles project initialization with
assets/- Embedded file system containing templates, commands and agents
The tool creates a standardized project structure:
.claude/commands/- Claude Code command files (includesspecify.mdworkflow).claude/agents/- Claude Code agent files for specialized workflows.spec/- Feature specifications directory with numbered folders (e.g.,001-feature-name).spec/templates/- Localized templates for customization.spec-status.jsonfiles - Track feature development phases with JSON status
specware init <directory>- Initialize project with spec workflow supportspecware localize-templates- Copy embedded templates to.spec/templates/for customizationspecware feature new-requirements <short-name>- Create new feature specification directoryspecware feature new-implementation-plan <short-name>- Add implementation plan to existing featurespecware feature update-state <short-name> <status>- Update feature status tracking
Features are tracked through .spec-status.json files with suggested statuses:
"Requirements Gathering""Requirements Context Gathering""Requirements Expert Q&A""Requirements Complete""Requirements Interactive Review""Implementation Planning""Implementation Plan Q&A""Implementation Plan Generated""Implementation Plan Interactive Review""Implementation Planning Complete"
Uses Ginkgo v2 and Gomega for BDD-style testing with two test suites:
Located in internal/spec/ with the pattern *_test.go and *_suite_test.go. These test individual components and business logic.
Located in tests/ directory with full end-to-end testing of the CLI tool:
tests/integration_suite_test.go- Integration test suite setuptests/init_integration_test.go- Tests for project initialization workflows including Claude Code settings integration- Tests build the actual binary and execute commands in isolated temporary directories
- Validates complete workflows including allowlist updates and settings file handling