Skip to content

feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9)#26

Merged
djm81 merged 16 commits intodevfrom
feature/code2spec-strategic-plan-phase0
Nov 20, 2025
Merged

feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9)#26
djm81 merged 16 commits intodevfrom
feature/code2spec-strategic-plan-phase0

Conversation

@djm81
Copy link
Copy Markdown
Collaborator

@djm81 djm81 commented Nov 20, 2025

Overview

This PR implements Phase 0 of the Code2Spec Strategic Plan, delivering significant enhancements across plan bundle management, performance optimizations, CLI UX improvements, and new analysis capabilities. This represents a comprehensive update spanning versions 0.6.2 through 0.6.9.

Changes Summary

  • 125 files changed: 8,212 insertions(+), 11,570 deletions(-)
  • 15 commits ahead of dev branch
  • Versions: 0.6.2 → 0.6.4 → 0.6.6 → 0.6.7 → 0.6.8 → 0.6.9

Key Features by Version

Version 0.6.9 - Plan Bundle Upgrade & Performance

Plan Bundle Upgrade System

  • New specfact plan upgrade command to migrate plan bundles from older schema versions to current version
  • Supports upgrading active plan, specific plan, or all plans with --all flag
  • --dry-run option to preview upgrades without making changes
  • Automatic detection of schema version mismatches and missing summary metadata
  • Migration path: 1.0 → 1.1 (adds summary metadata)

Performance Improvements

  • 44% faster plan selection (3.6s vs 6.5s)
  • Summary metadata (metadata.summary) for fast access without full parsing
  • Summary includes: features_count, stories_count, themes_count, releases_count, content_hash, computed_at
  • For large files (>10MB), only reads first 50KB to extract metadata
  • Content hash enables integrity verification of plan bundles
  • Optimized list_plans() to read summary metadata from top of YAML files
  • Early filtering: when --last N is used, only processes N+10 most recent files

Enhanced Plan Select Command

  • New --name NAME flag: Select plan by exact filename (non-interactive)
  • New --id HASH flag: Select plan by content hash ID (non-interactive)
  • --current flag now auto-selects active plan in non-interactive mode (no prompts)
  • Better CI/CD support with non-interactive selection options

Plan Bundle Schema Version

  • Current schema version updated to 1.1 (from 1.0)
  • New plan bundles automatically created with version 1.1
  • Summary metadata automatically computed when creating/updating plan bundles
  • PlanGenerator now sets version to current schema version automatically

Version 0.6.8 - Ambiguity Logic Improvements

Fixed Ambiguity Scanner False Positives

  • Fixed false positive detection of vague acceptance criteria for code-specific criteria
  • Ambiguity scanner now correctly identifies code-specific criteria (containing method signatures, class names, type hints, file paths) and skips them
  • Prevents flagging testable, code-specific acceptance criteria as vague during plan review
  • Improved detection accuracy for plans imported from code (code2spec workflow)

Shared Acceptance Criteria Utility

  • New src/specfact_cli/utils/acceptance_criteria.py module
  • is_code_specific_criteria() function for detecting code-specific vs vague criteria
  • Detects method signatures, class names, type hints, file paths, specific assertions
  • Enhanced vague pattern detection with word boundaries (\b) to avoid false positives
  • Prevents matching "works" in "workspace" or "is done" in "is_done_method"
  • Both PlanEnricher and AmbiguityScanner now use shared detection logic
  • Full contract-first validation with @beartype and @icontract decorators

Version 0.6.7 - CLI Banner & Visual Enhancements

Banner Display

  • Added ASCII art banner display by default for all commands
  • Banner shows with gradient effect (blue → cyan → white)
  • Improves brand recognition and visual appeal
  • Added --no-banner flag to suppress banner (useful for CI/CD)
  • Banner displays with help output (--help or -h)
  • Banner displays with version output (--version or -v)

Version 0.6.6 - CLI UX Improvements

CLI Help Improvements

  • Added automatic help display when specfact is executed without parameters
  • Prevents user confusion by showing help screen instead of silent failure
  • Added -h as alias for --help flag (standard CLI convention)
  • Added -v as alias for --version flag

Boolean Flag Documentation Fixes

  • Fixed misleading help text for --draft flag in plan update-feature command
  • Updated help text to clarify: use --draft to set True, --no-draft to set False, omit to leave unchanged
  • Fixed prompt templates to show correct boolean flag usage
  • Updated all documentation to reflect correct Typer boolean flag syntax

Entry Point Flag Documentation

  • Enhanced --entry-point flag documentation in import from-code command
  • Added use cases: multi-project repos, large codebases, incremental modernization
  • Updated prompt templates to include --entry-point usage examples

Version 0.6.4 - IDE Setup & Cross-Platform Support

IDE Setup Template Directory Lookup

  • Fixed template directory detection for specfact init command when running via uvx
  • Enhanced cross-platform package location detection (Windows, Linux, macOS)
  • Added comprehensive search across all installation types:
    • User site-packages
    • System site-packages
    • Virtual environments (venv, conda, etc.)
    • uvx cache locations
  • Improved error messages with detailed debug output showing all attempted locations
  • Added fallback mechanisms for edge cases and minimal Python installations

Cross-Platform Package Location Utilities

  • New get_package_installation_locations() function in ide_setup.py
  • New find_package_resources_path() function for locating package resources
  • Platform-specific path resolution with proper handling of symlinks, case sensitivity, and path separators
  • Enhanced debug output showing all lookup attempts and found locations

CLI Entry Point Alias

  • Added specfact-cli entry point alias for uvx compatibility
  • Now supports both uvx specfact-cli and uvx --from specfact-cli specfact usage patterns

Version 0.6.2 - Phase 2: Contract Extraction

Contract Extraction

  • Contract extraction for all features (100% coverage)
  • ContractExtractor module extracts API contracts from function signatures, type hints, and validation logic
  • Integration with plan generation workflow

Testing

  • Comprehensive E2E tests for Phase 1 and Phase 2 features
  • Integration tests for plan upgrade workflow
  • Unit tests for new analyzers and extractors
  • Constitution evidence and contract extraction tests
  • Plan migration system tests
  • Acceptance criteria utility tests

Documentation

  • Updated command reference documentation
  • Enhanced directory structure documentation
  • Improved troubleshooting guides
  • Updated workflow documentation
  • Added banner display documentation
  • Enhanced boolean flag usage documentation
  • Updated entry point flag documentation

Quality Checks

  • ✅ Code formatting applied
  • ✅ YAML files formatted
  • ✅ Type checker error in analyze_agent.py fixed (added missing Metadata parameters)
  • ⚠️ Type checker warnings (non-blocking, mostly type inference issues in test files)

Breaking Changes

None - all changes are backward compatible with migration support.

Related

  • Implements Code2Spec Strategic Plan Phase 0
  • Builds on previous plan management improvements
  • Prepares foundation for Phase 1 features
  • Addresses CI/CD usability with non-interactive flags
  • Enhances developer experience with improved CLI UX

Dominikus Nold added 15 commits November 19, 2025 00:58
- Add Phase 2 contract extraction (Step 2.1) - 100% coverage for all features
- Fix malformed acceptance criteria parsing with regex-based extraction
- Fix feature numbering in Spec-Kit artifacts (sequential numbering)
- Update Phase 2 implementation status documentation
… (0.6.4)

- Fix template directory lookup for uvx installations
- Add comprehensive cross-platform package location detection
- Support Windows, Linux, macOS installation locations (user, system, venv, uvx cache)
- Add specfact-cli entry point alias for uvx compatibility
- Enhance debug output with detailed lookup attempts
- Add get_package_installation_locations() and find_package_resources_path() utilities
- Improve error messages with platform-specific debug information
- Update CHANGELOG.md for version 0.6.4
- Add automatic help display when specfact is executed without parameters
- Add -h as alias for --help flag (standard CLI convention)
- Document -v as alias for --help flag (already existed)
- Fix boolean flag documentation for --draft flag
- Enhance --entry-point flag documentation with use cases
- Update prompt validation checklist with boolean flag checks
- Update CHANGELOG.md with version 0.6.6 changes
- Update constitution command help text to specify Spec-Kit compatibility layer
- Add notes in documentation that SpecFact uses plan bundles internally
- Clarify when constitutions are needed (Spec-Kit sync, Spec-Kit format projects)
- Update all constitution command docstrings with Spec-Kit compatibility notes
- Add guidance that standalone SpecFact users should use 'specfact plan' instead
- Add professional ASCII art banner displaying 'SPECFACT'
- Banner shows when CLI is executed without parameters
- Banner also displays with --help and -h flags
- Uses Rich styling with bold cyan color for modern appearance
- Includes tagline: 'Spec→Contract→Sentinel for Contract-Driven Development'
- Improves user experience and brand recognition
- Fix ASCII art to correctly spell SPECFACT (was SPECEACT)
- Improve gradient from bright_cyan (top) to blue (bottom)
- Add smooth color transition across banner lines
- Enhance visual appeal similar to modern CLI tools like Spec-Kit
- Banner now displays by default for all commands
- Add --no-banner flag to suppress banner (useful for CI/CD)
- Banner shows with gradient effect (blue → cyan → white)
- Improves brand recognition while allowing clean CI/CD output
- Add --no-banner to global options list
- Document banner display behavior
- Add example for suppressing banner in CI/CD
- Updated version in pyproject.toml
- Updated version in src/specfact_cli/__init__.py
- Updated version in src/__init__.py
- Updated version in setup.py
- Added CHANGELOG.md entry for 0.6.7 (banner display feature)
@github-actions
Copy link
Copy Markdown
Contributor

SpecFact CLI Validation Report

All validations passed!
Duration: 22.11s
Checks: 4 total (3 passed) (1 skipped)

@djm81 djm81 marked this pull request as ready for review November 20, 2025 10:26
@djm81 djm81 merged commit 62e24dd into dev Nov 20, 2025
9 of 10 checks passed
djm81 added a commit that referenced this pull request Nov 22, 2025
* Build: Include resources in sdist and wheel builds

Co-authored-by: dominikus.nold <dominikus.nold@web.de>

* feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9) (#26)

* feat: Add JSON/YAML support for plan bundles (#27)

* feat: add batch update support for plan review and updates (v0.7.0)

- Add --batch-updates option to plan update-feature command
- Add --batch-updates option to plan update-story command
- Add --list-findings option to plan review command with structured output
- Refactor review function to reduce complexity
- Add comprehensive e2e tests for batch updates
- Update documentation and prompts to prefer batch updates
- Update version to 0.7.0

* fix: remove whitespace from blank lines and apply formatting

* docs: align all documentation with CLI-first, integration-focused positioning

- Updated all examples and guides with CLI-first messaging
- Added Integration Showcases references throughout documentation
- Emphasized integration diversity (VS Code, Cursor, GitHub Actions, pre-commit)
- Updated brownfield showcase examples with integration workflow sections
- Updated platform-frontend CMS to link to Integration Showcases README
- Reviewed and aligned all brownfield documentation for CLI-first approach
- Updated version to 0.7.1

Files updated:
- All docs/examples/ files (6 files)
- All docs/guides/ files (6 files)
- docs/reference/directory-structure.md
- platform-frontend/iac/scripts/payload-content-helper.js
- Version files: pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py
- CHANGELOG.md with comprehensive 0.7.1 entry

* fix: resolve type checking errors in constitution_evidence_extractor

- Fixed basedpyright warnings for repo_path.exists() in contract decorators
- Added isinstance() type guard to properly narrow Path | None types
- Updated Example 3 validation status to FULLY VALIDATED (CI/CD workflow verified in production)
- Updated documentation to reflect Example 3 is validated in specfact-cli repository CI/CD

Fixes type checking errors reported in GitHub Actions workflow:
- constitution_evidence_extractor.py:65:53 - Type of "exists" is unknown
- Fixed in all three methods: extract_article_vii_evidence, extract_article_viii_evidence, extract_article_ix_evidence

Example 3 Status Update:
- Changed from "COMMANDS VERIFIED" to "FULLY VALIDATED"
- Validated in production CI/CD (specfact-cli PR #28)
- Workflow successfully runs specfact repro and blocks PRs when validation fails

* Fix typecheck error

* Fix all type check errors

* Fix type annotations

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>
djm81 added a commit that referenced this pull request Nov 22, 2025
…29)

* Build: Include resources in sdist and wheel builds

Co-authored-by: dominikus.nold <dominikus.nold@web.de>

* feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9) (#26)

* feat: Add JSON/YAML support for plan bundles (#27)

* feat: add batch update support for plan review and updates (v0.7.0)

- Add --batch-updates option to plan update-feature command
- Add --batch-updates option to plan update-story command
- Add --list-findings option to plan review command with structured output
- Refactor review function to reduce complexity
- Add comprehensive e2e tests for batch updates
- Update documentation and prompts to prefer batch updates
- Update version to 0.7.0

* fix: remove whitespace from blank lines and apply formatting

* docs: align all documentation with CLI-first, integration-focused positioning

- Updated all examples and guides with CLI-first messaging
- Added Integration Showcases references throughout documentation
- Emphasized integration diversity (VS Code, Cursor, GitHub Actions, pre-commit)
- Updated brownfield showcase examples with integration workflow sections
- Updated platform-frontend CMS to link to Integration Showcases README
- Reviewed and aligned all brownfield documentation for CLI-first approach
- Updated version to 0.7.1

Files updated:
- All docs/examples/ files (6 files)
- All docs/guides/ files (6 files)
- docs/reference/directory-structure.md
- platform-frontend/iac/scripts/payload-content-helper.js
- Version files: pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py
- CHANGELOG.md with comprehensive 0.7.1 entry

* fix: resolve type checking errors in constitution_evidence_extractor

- Fixed basedpyright warnings for repo_path.exists() in contract decorators
- Added isinstance() type guard to properly narrow Path | None types
- Updated Example 3 validation status to FULLY VALIDATED (CI/CD workflow verified in production)
- Updated documentation to reflect Example 3 is validated in specfact-cli repository CI/CD

Fixes type checking errors reported in GitHub Actions workflow:
- constitution_evidence_extractor.py:65:53 - Type of "exists" is unknown
- Fixed in all three methods: extract_article_vii_evidence, extract_article_viii_evidence, extract_article_ix_evidence

Example 3 Status Update:
- Changed from "COMMANDS VERIFIED" to "FULLY VALIDATED"
- Validated in production CI/CD (specfact-cli PR #28)
- Workflow successfully runs specfact repro and blocks PRs when validation fails

* Fix typecheck error

* Fix all type check errors

* Fix type annotations

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>
djm81 added a commit that referenced this pull request Nov 24, 2025
…8.0) (#30)

* Build: Include resources in sdist and wheel builds

Co-authored-by: dominikus.nold <dominikus.nold@web.de>

* feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9) (#26)

* feat: Add JSON/YAML support for plan bundles (#27)

* feat: add batch update support for plan review and updates (v0.7.0)

- Add --batch-updates option to plan update-feature command
- Add --batch-updates option to plan update-story command
- Add --list-findings option to plan review command with structured output
- Refactor review function to reduce complexity
- Add comprehensive e2e tests for batch updates
- Update documentation and prompts to prefer batch updates
- Update version to 0.7.0

* fix: remove whitespace from blank lines and apply formatting

* docs: align all documentation with CLI-first, integration-focused positioning

- Updated all examples and guides with CLI-first messaging
- Added Integration Showcases references throughout documentation
- Emphasized integration diversity (VS Code, Cursor, GitHub Actions, pre-commit)
- Updated brownfield showcase examples with integration workflow sections
- Updated platform-frontend CMS to link to Integration Showcases README
- Reviewed and aligned all brownfield documentation for CLI-first approach
- Updated version to 0.7.1

Files updated:
- All docs/examples/ files (6 files)
- All docs/guides/ files (6 files)
- docs/reference/directory-structure.md
- platform-frontend/iac/scripts/payload-content-helper.js
- Version files: pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py
- CHANGELOG.md with comprehensive 0.7.1 entry

* fix: resolve type checking errors in constitution_evidence_extractor

- Fixed basedpyright warnings for repo_path.exists() in contract decorators
- Added isinstance() type guard to properly narrow Path | None types
- Updated Example 3 validation status to FULLY VALIDATED (CI/CD workflow verified in production)
- Updated documentation to reflect Example 3 is validated in specfact-cli repository CI/CD

Fixes type checking errors reported in GitHub Actions workflow:
- constitution_evidence_extractor.py:65:53 - Type of "exists" is unknown
- Fixed in all three methods: extract_article_vii_evidence, extract_article_viii_evidence, extract_article_ix_evidence

Example 3 Status Update:
- Changed from "COMMANDS VERIFIED" to "FULLY VALIDATED"
- Validated in production CI/CD (specfact-cli PR #28)
- Workflow successfully runs specfact repro and blocks PRs when validation fails

* Fix typecheck error

* Fix all type check errors

* Fix type annotations

* feat: Phase 4 complete - Contract generation and density scoring

- Add contract density validator (contract_validator.py) with metrics calculation
- Integrate contract density into enforce sdd and plan review commands
- Add contract density metrics display in plan review output
- Fix plan bundle hash persistence in plan harden command
- Add integration test for plan bundle hash persistence
- Update version to 0.8.0
- Update CHANGELOG.md with Phase 4 completion details
- Update end-user documentation with new commands (plan harden, enforce sdd, generate contracts)

Phase 4 Status: ✅ COMPLETE (2025-11-24)
- 4.1 Contract Stub Generator: ✅ Complete
- 4.2 Contract Density Scoring: ✅ Complete (10 unit tests passing)

Test Coverage:
- 10 unit tests for contract density validation
- 1 integration test for hash persistence
- All tests passing

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>
djm81 added a commit that referenced this pull request Nov 30, 2025
* Build: Include resources in sdist and wheel builds

Co-authored-by: dominikus.nold <dominikus.nold@web.de>

* feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9) (#26)

* feat: Add JSON/YAML support for plan bundles (#27)

* feat: add batch update support for plan review and updates (v0.7.0)

- Add --batch-updates option to plan update-feature command
- Add --batch-updates option to plan update-story command
- Add --list-findings option to plan review command with structured output
- Refactor review function to reduce complexity
- Add comprehensive e2e tests for batch updates
- Update documentation and prompts to prefer batch updates
- Update version to 0.7.0

* fix: remove whitespace from blank lines and apply formatting

* docs: align all documentation with CLI-first, integration-focused positioning

- Updated all examples and guides with CLI-first messaging
- Added Integration Showcases references throughout documentation
- Emphasized integration diversity (VS Code, Cursor, GitHub Actions, pre-commit)
- Updated brownfield showcase examples with integration workflow sections
- Updated platform-frontend CMS to link to Integration Showcases README
- Reviewed and aligned all brownfield documentation for CLI-first approach
- Updated version to 0.7.1

Files updated:
- All docs/examples/ files (6 files)
- All docs/guides/ files (6 files)
- docs/reference/directory-structure.md
- platform-frontend/iac/scripts/payload-content-helper.js
- Version files: pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py
- CHANGELOG.md with comprehensive 0.7.1 entry

* fix: resolve type checking errors in constitution_evidence_extractor

- Fixed basedpyright warnings for repo_path.exists() in contract decorators
- Added isinstance() type guard to properly narrow Path | None types
- Updated Example 3 validation status to FULLY VALIDATED (CI/CD workflow verified in production)
- Updated documentation to reflect Example 3 is validated in specfact-cli repository CI/CD

Fixes type checking errors reported in GitHub Actions workflow:
- constitution_evidence_extractor.py:65:53 - Type of "exists" is unknown
- Fixed in all three methods: extract_article_vii_evidence, extract_article_viii_evidence, extract_article_ix_evidence

Example 3 Status Update:
- Changed from "COMMANDS VERIFIED" to "FULLY VALIDATED"
- Validated in production CI/CD (specfact-cli PR #28)
- Workflow successfully runs specfact repro and blocks PRs when validation fails

* Fix typecheck error

* Fix all type check errors

* Fix type annotations

* feat: Phase 4 complete - Contract generation and density scoring

- Add contract density validator (contract_validator.py) with metrics calculation
- Integrate contract density into enforce sdd and plan review commands
- Add contract density metrics display in plan review output
- Fix plan bundle hash persistence in plan harden command
- Add integration test for plan bundle hash persistence
- Update version to 0.8.0
- Update CHANGELOG.md with Phase 4 completion details
- Update end-user documentation with new commands (plan harden, enforce sdd, generate contracts)

Phase 4 Status: ✅ COMPLETE (2025-11-24)
- 4.1 Contract Stub Generator: ✅ Complete
- 4.2 Contract Density Scoring: ✅ Complete (10 unit tests passing)

Test Coverage:
- 10 unit tests for contract density validation
- 1 integration test for hash persistence
- All tests passing

* feat: Complete Phase 4.1 Bridge Configuration Schema and Add Conflict Detection (#31)

* feat: modular project bundle structure and bridge architecture (v0.9.0)

- Implement modular project bundle structure (Phases 1-3)
  - Directory-based bundles with separated aspects
  - Bundle manifest with dual versioning and checksums
  - Lazy loading for features
  - Format detection and bundle loader/writer

- Implement configurable bridge architecture (Phase 4 partial)
  - Bridge configuration models (adapter-agnostic)
  - Bridge detection and probe (auto-detect tool versions)
  - Bridge-based sync, templates, and watch mode
  - Spec-Kit is one adapter option among many

- Update all commands to use --bundle parameter
  - All commands require explicit bundle name
  - SDD integration updated for modular bundles
  - 68 integration tests passing

- Update documentation to reflect bridge architecture
  - Implementation plans updated with completion status
  - Architecture documentation for adapter-agnostic approach

BREAKING CHANGE: All commands now require --bundle parameter.
Modular format is the only supported format.

* feat: complete Phase 4.1 bridge configuration schema and add conflict detection

- Complete Phase 4.1: Bridge Configuration Schema
  - Add preset methods: preset_speckit_classic(), preset_speckit_modern(), preset_generic_markdown()
  - Add comprehensive tests for all preset methods (5 new tests)
  - All bridge configuration models complete with contract decorators

- Add conflict detection enhancement
  - Warn when overwriting existing files during export_artifact()
  - Warn when updating bundles during import_artifact()
  - Add test_export_artifact_conflict_detection test
  - Improves safety of sync operations

- Update documentation
  - Mark Phase 4.1 as completed (2025-11-26)
  - Mark conflict detection as completed
  - Document deferred items with acceptance criteria
  - Update test counts (84 unit tests passing)

Test Results:
- ✅ 84 unit tests passing (bridge components)
- ✅ All contract tests passing
- ✅ Type checking: 0 errors

Phase 4 Status: ✅ COMPLETE (all 5 sub-phases done)

* fix: update integration tests for new command signatures

- Update generate contracts tests to use --plan with bundle directory
- Update import tests to use 'from-bridge --adapter speckit' instead of 'from-spec-kit'
- Update sync tests to use 'sync bridge --adapter speckit' instead of 'sync spec-kit'
- Update test assertions for modular bundle structure (projects/ instead of plans/)
- Fix SDD path references (sdd/<bundle-name>.yaml instead of sdd.yaml)

Fixes CI failures in:
- test_generate_contracts_creates_files
- test_import_speckit_via_cli_command
- test_bidirectional_sync_with_format_compatibility

* Fix tests

* apply format and lint

* Fix tests

* Fix all test failures

* Fixed type checks

* Update patch version

* Update docs and fix some logic

* Update prompt templates

---------

Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>

* Fix integration test

* feat: update prompt templates with standardized parameter names

- Update all prompt templates to use new standardized parameters:
  - --non-interactive → --no-interactive
  - --format → --output-format
- Updated files:
  - specfact-plan-select.md (45 instances)
  - specfact-plan-promote.md (7 instances)
  - specfact-plan-review.md (4 instances)
  - specfact-plan-compare.md (16 instances + format updates)
- All prompt templates now synchronized with CLI parameter standardization (Phase 1)

Part of CLI Reorganization Phase 1 completion.

* Update prompts and cli order

* feat: CLI reorganization and Specmatic integration (v0.10.0) (#32)

* feat: CLI reorganization and Specmatic integration (v0.10.0)

- Add Specmatic integration with npx support
  - New 'spec' command group for API contract testing
  - Auto-detection of specmatic (direct or npx)
  - Integration with import, enforce, and sync commands
  - Comprehensive test coverage and documentation

- Reorganize CLI commands
  - Move constitution commands to bridge group
  - Remove legacy constitution command (no deprecation period)
  - Reorder commands in logical workflow sequence
  - Remove hello command, show welcome message on no args

- Fix test suite
  - Fix 4 failing e2e tests in test_init_command.py
  - Fix all linter issues (RUF005, RUF059)
  - All 1018 tests passing

- Update version to 0.10.0
  - Sync version across pyproject.toml, __init__.py, setup.py
  - Add comprehensive changelog entry

* Update module version

---------

Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>

* feat: complete CLI reorganization (v0.10.1)

- Phase 1: Parameter standardization complete
  - Standardized all parameter names (--repo, --out, --output-format, --no-interactive, --bundle)
  - Created parameter standard document
  - Added deprecation warnings for old parameter names

- Phase 2: Parameter grouping complete
  - All commands organized with logical parameter groups
  - Help text updated with parameter group documentation
  - Improved discoverability and organization

- Phase 3: Slash command reorganization complete
  - Reduced from 13 to 8 commands with numbered workflow ordering
  - New commands: specfact.01-import through specfact.06-sync
  - Shared CLI enforcement rules created
  - All templates follow consistent structure

- Phase 4: Documentation updates complete
  - All command reference documentation updated
  - All user guides updated with new parameter structure
  - Migration guide expanded with comprehensive changes
  - All examples use consistent --bundle parameter format

BREAKING CHANGE: All commands now require --bundle parameter (no default).
Old parameter names deprecated (3-month transition period).
Slash commands reorganized (old commands deprecated).

Version: 0.10.1

* feat: migration tool test coverage and enhanced analysis features (#33)

* chore: bump version to 0.10.2 and add changelog

- Added SDD Feature Parity Implementation (Phases 1.5, 5.1, 5.2, 5.3)
- Multi-SDD infrastructure with discovery utility
- Task generation from plan bundles and SDD manifests
- Code implementation command for executing tasks
- Idea-to-ship orchestrator for end-to-end workflow
- Fixed enum serialization bug in task generation
- Fixed bundle name validation in orchestrator
- Comprehensive test coverage (26 new tests)

* chore: bump version to 0.11.0

- Fixed test timeout in test_init_handles_missing_templates
- Enhanced error handling in get_package_installation_locations()
- Added skip logic for problematic directories (typeshed stubs)
- Improved test mocking for both utils and commands modules
- Updated version consistently across pyproject.toml, setup.py, and __init__.py files

* feat: add --include-tests flag for configurable test file filtering in relationship mapping

- Add --include-tests flag to import from-code command
- Test files filtered by default for ~30-50% speed improvement
- Rationale: Test files are consumers of production code (one-way dependency)
- Configurable via flag for comprehensive analysis when needed
- Update CHANGELOG.md for version 0.11.1
- Update internal documentation with test file filtering optimization

* fix: resolve max_workers validation, prompt validation, and type checking errors

- Fix ThreadPoolExecutor max_workers must be > 0 in 5 locations
  - graph_analyzer.py: build_dependency_graph()
  - import_cmd.py: contract loading, hash updates, contract extraction
  - code_analyzer.py: file analysis parallelization
- Fix prompt validation test path resolution (4 parent levels)
- Fix prompt glob pattern (specfact-*.md -> specfact.*.md)
- Fix 53 basedpyright errors for missing Feature parameters
- Update version to 0.11.2 and sync across all version files

All 9 previously failing tests now passing.

* Add codeowners

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* feat: enhance target user extraction and remove GWT format references (v0.11.3) (#34)

* feat: enhance target user extraction and remove GWT format references

- Refactor target user extraction to prioritize pyproject.toml and README.md over codebase scanning
- Simplify excluded terms list (reduced from 60+ to 14 terms)
- Remove GWT format references from ambiguity scanner questions
- Update question text to clarify acceptance criteria vs OpenAPI contracts
- Fix false positives in user persona extraction (e.g., 'Detecting', 'Data Pipelines')
- Improve README.md extraction to skip use cases, only extract personas

Version bump: 0.11.2 → 0.11.3

* fix: remove invalid forced include for resources/semgrep

- Removed forced include for resources/semgrep (directory doesn't exist at root)
- Semgrep files are in src/specfact_cli/resources/semgrep/ and are automatically included
- Fixes build error: FileNotFoundError: Forced include not found

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
djm81 added a commit that referenced this pull request Dec 2, 2025
#37)

* Build: Include resources in sdist and wheel builds

Co-authored-by: dominikus.nold <dominikus.nold@web.de>

* feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9) (#26)

* feat: Add JSON/YAML support for plan bundles (#27)

* feat: add batch update support for plan review and updates (v0.7.0)

- Add --batch-updates option to plan update-feature command
- Add --batch-updates option to plan update-story command
- Add --list-findings option to plan review command with structured output
- Refactor review function to reduce complexity
- Add comprehensive e2e tests for batch updates
- Update documentation and prompts to prefer batch updates
- Update version to 0.7.0

* fix: remove whitespace from blank lines and apply formatting

* docs: align all documentation with CLI-first, integration-focused positioning

- Updated all examples and guides with CLI-first messaging
- Added Integration Showcases references throughout documentation
- Emphasized integration diversity (VS Code, Cursor, GitHub Actions, pre-commit)
- Updated brownfield showcase examples with integration workflow sections
- Updated platform-frontend CMS to link to Integration Showcases README
- Reviewed and aligned all brownfield documentation for CLI-first approach
- Updated version to 0.7.1

Files updated:
- All docs/examples/ files (6 files)
- All docs/guides/ files (6 files)
- docs/reference/directory-structure.md
- platform-frontend/iac/scripts/payload-content-helper.js
- Version files: pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py
- CHANGELOG.md with comprehensive 0.7.1 entry

* fix: resolve type checking errors in constitution_evidence_extractor

- Fixed basedpyright warnings for repo_path.exists() in contract decorators
- Added isinstance() type guard to properly narrow Path | None types
- Updated Example 3 validation status to FULLY VALIDATED (CI/CD workflow verified in production)
- Updated documentation to reflect Example 3 is validated in specfact-cli repository CI/CD

Fixes type checking errors reported in GitHub Actions workflow:
- constitution_evidence_extractor.py:65:53 - Type of "exists" is unknown
- Fixed in all three methods: extract_article_vii_evidence, extract_article_viii_evidence, extract_article_ix_evidence

Example 3 Status Update:
- Changed from "COMMANDS VERIFIED" to "FULLY VALIDATED"
- Validated in production CI/CD (specfact-cli PR #28)
- Workflow successfully runs specfact repro and blocks PRs when validation fails

* Fix typecheck error

* Fix all type check errors

* Fix type annotations

* feat: Phase 4 complete - Contract generation and density scoring

- Add contract density validator (contract_validator.py) with metrics calculation
- Integrate contract density into enforce sdd and plan review commands
- Add contract density metrics display in plan review output
- Fix plan bundle hash persistence in plan harden command
- Add integration test for plan bundle hash persistence
- Update version to 0.8.0
- Update CHANGELOG.md with Phase 4 completion details
- Update end-user documentation with new commands (plan harden, enforce sdd, generate contracts)

Phase 4 Status: ✅ COMPLETE (2025-11-24)
- 4.1 Contract Stub Generator: ✅ Complete
- 4.2 Contract Density Scoring: ✅ Complete (10 unit tests passing)

Test Coverage:
- 10 unit tests for contract density validation
- 1 integration test for hash persistence
- All tests passing

* feat: Complete Phase 4.1 Bridge Configuration Schema and Add Conflict Detection (#31)

* feat: modular project bundle structure and bridge architecture (v0.9.0)

- Implement modular project bundle structure (Phases 1-3)
  - Directory-based bundles with separated aspects
  - Bundle manifest with dual versioning and checksums
  - Lazy loading for features
  - Format detection and bundle loader/writer

- Implement configurable bridge architecture (Phase 4 partial)
  - Bridge configuration models (adapter-agnostic)
  - Bridge detection and probe (auto-detect tool versions)
  - Bridge-based sync, templates, and watch mode
  - Spec-Kit is one adapter option among many

- Update all commands to use --bundle parameter
  - All commands require explicit bundle name
  - SDD integration updated for modular bundles
  - 68 integration tests passing

- Update documentation to reflect bridge architecture
  - Implementation plans updated with completion status
  - Architecture documentation for adapter-agnostic approach

BREAKING CHANGE: All commands now require --bundle parameter.
Modular format is the only supported format.

* feat: complete Phase 4.1 bridge configuration schema and add conflict detection

- Complete Phase 4.1: Bridge Configuration Schema
  - Add preset methods: preset_speckit_classic(), preset_speckit_modern(), preset_generic_markdown()
  - Add comprehensive tests for all preset methods (5 new tests)
  - All bridge configuration models complete with contract decorators

- Add conflict detection enhancement
  - Warn when overwriting existing files during export_artifact()
  - Warn when updating bundles during import_artifact()
  - Add test_export_artifact_conflict_detection test
  - Improves safety of sync operations

- Update documentation
  - Mark Phase 4.1 as completed (2025-11-26)
  - Mark conflict detection as completed
  - Document deferred items with acceptance criteria
  - Update test counts (84 unit tests passing)

Test Results:
- ✅ 84 unit tests passing (bridge components)
- ✅ All contract tests passing
- ✅ Type checking: 0 errors

Phase 4 Status: ✅ COMPLETE (all 5 sub-phases done)

* fix: update integration tests for new command signatures

- Update generate contracts tests to use --plan with bundle directory
- Update import tests to use 'from-bridge --adapter speckit' instead of 'from-spec-kit'
- Update sync tests to use 'sync bridge --adapter speckit' instead of 'sync spec-kit'
- Update test assertions for modular bundle structure (projects/ instead of plans/)
- Fix SDD path references (sdd/<bundle-name>.yaml instead of sdd.yaml)

Fixes CI failures in:
- test_generate_contracts_creates_files
- test_import_speckit_via_cli_command
- test_bidirectional_sync_with_format_compatibility

* Fix tests

* apply format and lint

* Fix tests

* Fix all test failures

* Fixed type checks

* Update patch version

* Update docs and fix some logic

* Update prompt templates

---------

Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>

* Fix integration test

* feat: update prompt templates with standardized parameter names

- Update all prompt templates to use new standardized parameters:
  - --non-interactive → --no-interactive
  - --format → --output-format
- Updated files:
  - specfact-plan-select.md (45 instances)
  - specfact-plan-promote.md (7 instances)
  - specfact-plan-review.md (4 instances)
  - specfact-plan-compare.md (16 instances + format updates)
- All prompt templates now synchronized with CLI parameter standardization (Phase 1)

Part of CLI Reorganization Phase 1 completion.

* Update prompts and cli order

* feat: CLI reorganization and Specmatic integration (v0.10.0) (#32)

* feat: CLI reorganization and Specmatic integration (v0.10.0)

- Add Specmatic integration with npx support
  - New 'spec' command group for API contract testing
  - Auto-detection of specmatic (direct or npx)
  - Integration with import, enforce, and sync commands
  - Comprehensive test coverage and documentation

- Reorganize CLI commands
  - Move constitution commands to bridge group
  - Remove legacy constitution command (no deprecation period)
  - Reorder commands in logical workflow sequence
  - Remove hello command, show welcome message on no args

- Fix test suite
  - Fix 4 failing e2e tests in test_init_command.py
  - Fix all linter issues (RUF005, RUF059)
  - All 1018 tests passing

- Update version to 0.10.0
  - Sync version across pyproject.toml, __init__.py, setup.py
  - Add comprehensive changelog entry

* Update module version

---------

Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>

* feat: complete CLI reorganization (v0.10.1)

- Phase 1: Parameter standardization complete
  - Standardized all parameter names (--repo, --out, --output-format, --no-interactive, --bundle)
  - Created parameter standard document
  - Added deprecation warnings for old parameter names

- Phase 2: Parameter grouping complete
  - All commands organized with logical parameter groups
  - Help text updated with parameter group documentation
  - Improved discoverability and organization

- Phase 3: Slash command reorganization complete
  - Reduced from 13 to 8 commands with numbered workflow ordering
  - New commands: specfact.01-import through specfact.06-sync
  - Shared CLI enforcement rules created
  - All templates follow consistent structure

- Phase 4: Documentation updates complete
  - All command reference documentation updated
  - All user guides updated with new parameter structure
  - Migration guide expanded with comprehensive changes
  - All examples use consistent --bundle parameter format

BREAKING CHANGE: All commands now require --bundle parameter (no default).
Old parameter names deprecated (3-month transition period).
Slash commands reorganized (old commands deprecated).

Version: 0.10.1

* feat: migration tool test coverage and enhanced analysis features (#33)

* chore: bump version to 0.10.2 and add changelog

- Added SDD Feature Parity Implementation (Phases 1.5, 5.1, 5.2, 5.3)
- Multi-SDD infrastructure with discovery utility
- Task generation from plan bundles and SDD manifests
- Code implementation command for executing tasks
- Idea-to-ship orchestrator for end-to-end workflow
- Fixed enum serialization bug in task generation
- Fixed bundle name validation in orchestrator
- Comprehensive test coverage (26 new tests)

* chore: bump version to 0.11.0

- Fixed test timeout in test_init_handles_missing_templates
- Enhanced error handling in get_package_installation_locations()
- Added skip logic for problematic directories (typeshed stubs)
- Improved test mocking for both utils and commands modules
- Updated version consistently across pyproject.toml, setup.py, and __init__.py files

* feat: add --include-tests flag for configurable test file filtering in relationship mapping

- Add --include-tests flag to import from-code command
- Test files filtered by default for ~30-50% speed improvement
- Rationale: Test files are consumers of production code (one-way dependency)
- Configurable via flag for comprehensive analysis when needed
- Update CHANGELOG.md for version 0.11.1
- Update internal documentation with test file filtering optimization

* fix: resolve max_workers validation, prompt validation, and type checking errors

- Fix ThreadPoolExecutor max_workers must be > 0 in 5 locations
  - graph_analyzer.py: build_dependency_graph()
  - import_cmd.py: contract loading, hash updates, contract extraction
  - code_analyzer.py: file analysis parallelization
- Fix prompt validation test path resolution (4 parent levels)
- Fix prompt glob pattern (specfact-*.md -> specfact.*.md)
- Fix 53 basedpyright errors for missing Feature parameters
- Update version to 0.11.2 and sync across all version files

All 9 previously failing tests now passing.

* Add codeowners

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* feat: enhance target user extraction and remove GWT format references (v0.11.3) (#34)

* feat: enhance target user extraction and remove GWT format references

- Refactor target user extraction to prioritize pyproject.toml and README.md over codebase scanning
- Simplify excluded terms list (reduced from 60+ to 14 terms)
- Remove GWT format references from ambiguity scanner questions
- Update question text to clarify acceptance criteria vs OpenAPI contracts
- Fix false positives in user persona extraction (e.g., 'Detecting', 'Data Pipelines')
- Improve README.md extraction to skip use cases, only extract personas

Version bump: 0.11.2 → 0.11.3

* fix: remove invalid forced include for resources/semgrep

- Removed forced include for resources/semgrep (directory doesn't exist at root)
- Semgrep files are in src/specfact_cli/resources/semgrep/ and are automatically included
- Fixes build error: FileNotFoundError: Forced include not found

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* feat: version 0.11.4 - SDD hash stability, enforce sdd bug fix, prompt optimization

- Fix SDD checksum mismatch by excluding clarifications from hash computation
- Add deterministic feature sorting by key for consistent hash calculation
- Fix enforce sdd command @require decorator to allow None bundle parameter
- Suppress Rich library warnings about ipywidgets in test output
- Optimize all prompt files for token efficiency (822 lines, ~2,872 words)
- Update prompts to reflect active plan fallback functionality
- Add unified progress display utilities with timing information
- Update version to 0.11.4 across all version files

* Improve review template

* fix: resolve Rich Progress display conflicts and contract violations in tests

- Add test mode detection to progress utilities to skip Progress display in tests
- Implement safe Progress display creation with fallback to direct load/save
- Fix icontract @Ensure decorator syntax (lambda result: None -> result is None)
- Add explicit return None statements to satisfy contract requirements
- Fixes 11 failing tests related to LiveError and contract violations

All tests now pass across Python 3.11, 3.12, and 3.13.

* chore: bump version to 0.11.5

- Update version in pyproject.toml, setup.py, src/__init__.py, and src/specfact_cli/__init__.py
- Add CHANGELOG entry for version 0.11.5 documenting test fixes

* style: fix formatting issues

- Remove unnecessary return None statements (use implicit return)
- Fix RET504 error: return directly instead of assigning before return
- All formatting checks now pass

* feat: version 0.11.4 - SDD hash stability, enforce sdd bug fix, prompt optimization (#36)

* feat: version 0.11.4 - SDD hash stability, enforce sdd bug fix, prompt optimization

- Fix SDD checksum mismatch by excluding clarifications from hash computation
- Add deterministic feature sorting by key for consistent hash calculation
- Fix enforce sdd command @require decorator to allow None bundle parameter
- Suppress Rich library warnings about ipywidgets in test output
- Optimize all prompt files for token efficiency (822 lines, ~2,872 words)
- Update prompts to reflect active plan fallback functionality
- Add unified progress display utilities with timing information
- Update version to 0.11.4 across all version files

* Improve review template

* fix: resolve Rich Progress display conflicts and contract violations in tests

- Add test mode detection to progress utilities to skip Progress display in tests
- Implement safe Progress display creation with fallback to direct load/save
- Fix icontract @Ensure decorator syntax (lambda result: None -> result is None)
- Add explicit return None statements to satisfy contract requirements
- Fixes 11 failing tests related to LiveError and contract violations

All tests now pass across Python 3.11, 3.12, and 3.13.

* chore: bump version to 0.11.5

- Update version in pyproject.toml, setup.py, src/__init__.py, and src/specfact_cli/__init__.py
- Add CHANGELOG entry for version 0.11.5 documenting test fixes

* style: fix formatting issues

- Remove unnecessary return None statements (use implicit return)
- Fix RET504 error: return directly instead of assigning before return
- All formatting checks now pass

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dominikus Nold <dominikus@nold-ai.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
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