# Changelog

All notable changes to the Fortress Zero-Defect Framework will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2025-11-03

### Added
- **Layer 6 Smart Defaults** - Layer 6 now enabled by default with intelligent defaults
  - Universal smoke test for all project types
  - Auto-generated journeys based on project type detection
  - Web app defaults (Next.js, React, Vue)
  - API defaults (Express, FastAPI, NestJS)
  - Project type detection from fortress.config.json, package.json, and file structure
  - Smart defaults merge with custom journeys
  - `includeDefaults` configuration option

- **Quality Score Enhancement** - Improved scoring to reflect Layer 6 status
  - -2 point penalty when Layer 6 is skipped or encounters errors
  - Visual skip indicator (⚠️ Layer 6 skipped) in validation reports
  - Skipped validations excluded from quality calculation
  - Clear messaging about incomplete validation coverage

- **Comprehensive Test Coverage** - 87 new tests added
  - layer6-smart-defaults.test.ts (56 tests, 98.68% coverage)
  - layer6-quality-score.test.ts (31 tests, 100% coverage)
  - Total test suite: 788 tests passing

### Changed
- Layer 6 enabled by default (was disabled)
- Journey validation enabled by default (was disabled)
- Auth matrix validation enabled by default (was disabled)
- Quality scores now reflect actual validation coverage (skipped layers penalized)

### Technical Details
- Smart defaults use graceful degradation (no Playwright = skip with message)
- Project type detection has 3-tier fallback strategy
- Universal smoke test completes in <5s
- Backward compatible - existing configs respected
- TypeScript strict mode compliant (0 compilation errors)

### Philosophy Change
**Before:** Layer 6 disabled by default despite being "CRITICAL for Production Quality"
**After:** Layer 6 enabled by default, providing out-of-the-box integration validation

This aligns Fortress's implementation with its mission: preventing production bugs through comprehensive validation.

## [1.1.1] - 2025-11-03

### Fixed
- **Critical Bug**: Fixed hardcoded version `1.0.0` in CLI - version now reads dynamically from package.json
- Fixed `fortress --version` command to report correct version number
- Fixed fortress.config.json generation to use current Fortress version

### Technical Details
- Updated fortress-cli.ts to read version from package.json at runtime
- Removed hardcoded version strings on lines 1380 and 745

## [1.1.0] - 2025-11-03

### Added
- **Layer 6: Critical Journey Validation** - Major new validation layer addressing integration bugs and runtime behavior
  - Journey Validation: E2E testing of critical user workflows using Playwright
  - Contract Validation: Frontend/backend API agreement validation
  - Authentication Matrix: Test each endpoint with multiple auth states
  - Integration Testing: Verify components work together, not just in isolation
- Complete test suite for Layer 6 with 701 total tests passing
- Journey execution engine with retry logic and parallel execution
- Browser pool management for efficient E2E testing
- Step executor with timeout handling and error recovery
- Comprehensive journey type definitions and interfaces
- Layer 6 orchestrator with graceful degradation
- Configuration system for journey definitions
- Support for CRITICAL, HIGH, and LOW priority journeys

### Changed
- Updated validation pipeline to include Layer 6 as optional layer
- Enhanced fortress.config.json schema to support Layer 6 configuration
- Improved error handling and reporting across all validation layers
- Updated package description to reflect 6-layer validation system

### Technical Details
- 620+ lines of new Layer 6 code
- 100% TypeScript strict mode compliance
- Zero breaking changes to existing functionality
- Maintains <30s validation pipeline target
- Graceful degradation when Playwright not installed

### Documentation
- Added Layer 6 configuration examples
- Added sample journey definitions
- Updated implementation summary and executive summary
- Created comprehensive Layer 6 quick-start guide

## [1.0.9] - 2025-11-02

### Fixed
- Minor bug fixes and stability improvements

## [1.0.8] - 2025-11-01

### Fixed
- **Critical Bug**: Fixed `TypeError: Cannot read properties of undefined (reading 'toLowerCase')` that occurred when users selected "Custom Configuration" during `fortress init`
- Added null safety to `getFrameworkGuidelines()` and `getProjectTypeGuidelines()` functions in claude-generator.ts
- Added null safety to `getRequestFlows()` function in planning-generator.ts
- Set default framework value to 'custom' when framework is undefined

### Added
- Complete 'custom' project template to PROJECT_TEMPLATES with sensible defaults for flexible configurations
- Support for custom configurations in Memory framework generation

### Changed
- Updated TypeScript type definitions to make `framework` optional in ProjectConfig, ProjectInfo, and InitAnswers interfaces
- Improved error handling for custom project configurations

## [1.0.7] - 2025-10-28

### Added
- File protection for Memory framework files (PRD.txt, CLAUDE.md, PLANNING.md, TASKS.md)
- Enhanced security for project context files

## [1.0.6] - 2025-10-27

### Added
- Memory MCP Phase 1 - Persistent Project Context
- Knowledge graph integration for project memory
- Validation history tracking

## [1.0.5] - 2025-10-25

### Added
- Initial release of Fortress Zero-Defect Framework
- 5-layer validation pipeline (Automated Sentries, Specialist Validators, Cross-Validation, Coherence Checks, Developer Experience)
- Universal project type support (web-app, API, SaaS, mobile-app, data-system)
- Industry specialization configs (FinTech, HealthTech, E-commerce, Education)
- CLI with init, validate, deploy, and context commands
- GitHub Actions integration
- Meta-fortress capability (fortress validates itself)
- Quality score calculation and reporting
- NPM package workflow validation
