Commit Graph

459 Commits

Author SHA1 Message Date
7d115b6325 feat: add multi-schema validation with numbered selection
Enhanced schema-list and schema-validate commands to support efficient
batch validation of multiple schemas, especially useful when the
metaschema changes.

**schema-list enhancements:**
- Added numbered references (#1, #2, etc.) to all output formats
- Simple format: [1] prefix for each schema
- Table format: # column as first column
- JSON/YAML: number field added to each schema

**schema-validate enhancements:**
- Number selection: `markitect schema-validate 1`
- Range selection: `markitect schema-validate 1-3`
- List selection: `markitect schema-validate 1,3,5`
- Batch validation: `markitect schema-validate --all`
- Filename selection: `markitect schema-validate schema.md`
- Filesystem path: `markitect schema-validate ./schema.md`
- Batch results displayed as clear summary table
- Registry schemas take precedence with filesystem fallback
- Full backward compatibility maintained

**Implementation details:**
- Added ValidationResult dataclass for structured results
- Added helper functions: parse_schema_selector, resolve_schema_source,
  is_filesystem_path, format_validation_summary
- Changed schema_selector from Path to str for flexible input
- Added --all flag for validating all registered schemas
- Comprehensive error handling and helpful usage messages

**Testing:**
- All selection methods tested and working
- Backward compatibility verified
- Parsing utilities tested with unit tests

Completes Phase 5 of Schema-of-Schemas implementation.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 10:55:48 +01:00
60d9f7a2c3 feat: implement Phase 4 - Schema Migration
Completed Phase 4 of the schema-of-schemas implementation with successful
migration of all legacy schemas to the new markdown format following the
naming convention.

Migration Script (scripts/migrate_schemas.py - 240 lines):
- Automated schema migration from JSON to markdown format
- Updates version and $id fields to follow conventions
- Generates proper frontmatter metadata
- Dry-run mode for safe testing
- Database cleanup functionality
- Comprehensive progress reporting

Schemas Migrated (2):
- terminology-schema.json → terminology-schema-v1.0.md
  - Fixed missing version field
  - Updated $id from /terminology-v1.json to /terminology/v1.0
  - Validates successfully against metaschema

- api-documentation → api-documentation-schema-v1.0.md
  - Added version: 1.0.0
  - Updated $id to follow /api-documentation/v1.0 format
  - Validates successfully against metaschema

Schemas Deleted (3):
- markdown-manpage (duplicate of manpage-schema-v1.0.md)
- markdown-manpage-schema.json (duplicate of manpage-schema-v1.0.md)
- enhanced-manpage (replaced by manpage-schema-v1.0.md)

CLI Enhancement (markitect/cli.py):
- Updated schema-ingest to support markdown (.md) files
- Auto-detects file type and uses MarkdownSchemaLoader for .md files
- Extracts JSON schema from markdown for database storage
- Maintains backward compatibility with JSON files

Final Schema Registry (4 schemas):
 terminology-schema-v1.0.md - Terminology validation
 api-documentation-schema-v1.0.md - API documentation structure
 manpage-schema-v1.0.md - Unix manual pages
 schema-schema-v1.0.md - Metaschema for validating schemas

All schemas:
- Follow naming convention: {domain}-schema-v{major}.{minor}.md
- Include proper frontmatter with schema-id, version, status
- Validate successfully against schema-schema-v1.0.md metaschema
- Stored in database and ready for use

Progress Tracking:
- Updated TODO.md with Phase 4 completion
- Updated CHANGELOG.md with migration details
- Next: Phase 5 - CLI & Documentation Updates

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 09:38:43 +01:00
f3aaec99bb feat: implement Phase 3 - Schema-for-Schemas Metaschema
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Completed Phase 3 of the schema-of-schemas implementation with a
comprehensive metaschema that validates all MarkiTect schema files
against conventions and standards.

Metaschema Implementation (schema-schema-v1.0.md - 650+ lines):
- Validates core JSON Schema fields ($schema, $id, title, description)
- Validates MarkiTect version field (SemVer: major.minor.patch)
- Validates $id URL format (HTTPS with version path)
- Validates MarkiTect extensions:
  - x-markitect-sections: section classifications and content rules
  - x-markitect-content-control: pattern and quality validation
  - x-markitect-metadata: status, authors, tags
  - x-markitect-source: loader metadata (auto-added)
- Section classification validation (required, recommended, optional,
  discouraged, improper)
- Content control pattern validation
- Comprehensive documentation with examples and usage guides

CLI Command (markitect schema-validate):
- Validates schema files against metaschema
- Supports both markdown and JSON schema files
- Detailed error reporting with schema paths
- Structure validation recommendations
- Exit codes for CI/CD integration

Test Coverage (tests/test_schema_metaschema.py - 12 tests, 100% passing):
- Metaschema self-validation
- Manpage schema validation
- Required fields enforcement
- Version format validation (valid and invalid cases)
- $id format validation (valid and invalid cases)
- Section classification validation
- Complete schema with all extensions

Validation Results:
-  Metaschema validates itself successfully
-  Manpage schema (v1.0.md) validates successfully
- ⚠️  Terminology schema needs migration (missing version, incorrect $id)

Progress Tracking:
- Updated TODO.md with Phase 3 completion
- Updated CHANGELOG.md with implementation details
- Next: Phase 4 - Schema Migration

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 03:10:49 +01:00
b81ce5631d feat: implement Phase 2 - Markdown Schema Loader
Completed Phase 2 of the schema-of-schemas implementation with full
markdown schema support. This enables schemas to be authored as
markdown files with rich documentation and embedded JSON schemas.

Core Implementation (markitect/schema_loader.py):
- MarkdownSchemaLoader class with comprehensive parsing capabilities
- YAML frontmatter extraction with error handling
- JSON code block extraction with section preference (## Schema Definition)
- Metadata merging with x-markitect-source tracking
- Schema saving with template support and round-trip capability
- Helper methods: list_json_blocks(), validate_schema_structure()

Test Coverage (tests/test_schema_loader.py):
- 35 comprehensive unit tests (100% passing)
- Tests for loading, parsing, saving, round-trip conversion
- Edge case handling (empty files, binary files, malformed blocks)
- Fixed binary file test to use invalid UTF-8 sequences

Example Schema (markitect/schemas/manpage-schema-v1.0.md):
- First markdown schema following naming convention
- Complete manpage schema with frontmatter + documentation + JSON
- Demonstrates section classification and content control
- Shows proper structure for future schema authors

Documentation (roadmap/schema-of-schemas/SCHEMA_LOADER_GUIDE.md):
- Comprehensive user guide (600+ lines)
- API reference with examples
- Best practices and troubleshooting
- Integration patterns for CLI and validator

Progress Tracking:
- Updated TODO.md with Phase 2 completion
- Updated CHANGELOG.md with implementation details
- Next: Phase 3 - Schema-for-Schemas Metaschema

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 00:02:15 +01:00
14108533fb feat: implement schema filename validation (Phase 1 complete)
Implements filename convention enforcement for schema files as part of
the schema-of-schemas implementation. All schemas must now follow the
naming pattern: {domain}-schema-v{major}.{minor}.md

## Phase 1 Deliverables

### Schema Naming Module
**File:** `markitect/schema_naming.py` (380 lines)

**Functions:**
- `validate_schema_filename()` - Validate filename against pattern
- `suggest_schema_filename()` - Generate valid filename from domain/version
- `extract_schema_metadata()` - Extract domain and version from filename
- `get_validation_errors()` - Detailed error messages for invalid filenames
- `is_valid_schema_filename()` - Simple boolean validation
- `format_validation_message()` - User-friendly error formatting

**Features:**
- Regex-based pattern matching
- Automatic normalization (spaces → hyphens, lowercase)
- Detailed error reporting
- Domain validation (must start with letter)
- Version validation (major.minor format)

### Comprehensive Test Suite
**File:** `tests/test_schema_naming.py` (500+ lines, 50 tests)

**Test Coverage:**
-  Valid filename variations (simple, hyphenated, with numbers)
-  Invalid filenames (wrong extension, missing components, wrong case)
-  Filename suggestion with normalization
-  Metadata extraction
-  Error message generation
-  Edge cases (long names, many hyphens, large versions)
-  Pattern regex validation

**Results:** 50/50 tests passing (100%)

### Specification Document
**File:** `roadmap/schema-of-schemas/SCHEMA_NAMING_SPEC.md`

**Contents:**
- Formal specification of naming convention
- Regular expression pattern with explanation
- Valid and invalid examples
- Version numbering guidelines
- Domain naming best practices
- Normalization rules
- Migration strategy from legacy naming
- Implementation guide

## Naming Convention

### Format
```
{domain}-schema-v{major}.{minor}.md
```

### Examples
```
✓ manpage-schema-v1.0.md
✓ api-documentation-schema-v1.0.md
✓ terminology-schema-v1.0.md
✓ arc42-schema-v2.1.md

✗ manpage.json (wrong extension)
✗ ManPage-schema-v1.0.md (uppercase)
✗ manpage-v1.0.md (missing 'schema')
✗ manpage-schema-v1.md (missing minor version)
```

### Components
- **domain**: Lowercase, hyphen-separated, starts with letter
- **schema**: Literal keyword
- **version**: v{major}.{minor} (SemVer simplified)
- **extension**: .md (markdown)

## Implementation Highlights

### Automatic Normalization
```python
suggest_schema_filename("API Documentation", "2.1")
# → "api-documentation-schema-v2.1.md"

suggest_schema_filename("My_Custom Type", "1.0")
# → "my-custom-type-schema-v1.0.md"
```

### Detailed Error Reporting
```python
format_validation_message("invalid.json")
# → Detailed error list + suggested fix
```

### Metadata Extraction
```python
extract_schema_metadata("manpage-schema-v1.0.md")
# → {'domain': 'manpage', 'version': '1.0', 'major': 1, 'minor': 0}
```

## Migration Plan

Current schemas will be renamed:
```
Old                           → New
────────────────────────────────────────────────────────
terminology-schema.json       → terminology-schema-v1.0.md
api-documentation             → api-documentation-schema-v1.0.md
enhanced-manpage              → manpage-schema-v2.0.md
markdown-manpage              → DELETE (duplicate)
markdown-manpage-schema.json  → DELETE (duplicate)
```

## Phase 1 Status:  COMPLETE

### Completed
- [x] Schema naming module implementation
- [x] Comprehensive test suite (50 tests, 100% passing)
- [x] Specification document
- [x] TODO.md updated

### Next: Phase 2
- [ ] Update CLI schema-ingest with validation
- [ ] Implement markdown schema loader
- [ ] Parse frontmatter and JSON code blocks
- [ ] Update SchemaValidator for .md support

## Testing

```bash
# Run tests
pytest tests/test_schema_naming.py -v
# → 50 passed in 0.48s

# Test interactively
python -c "
from markitect.schema_naming import validate_schema_filename
print(validate_schema_filename('manpage-schema-v1.0.md'))
"
# → (True, {'domain': 'manpage', 'version': '1.0', ...})
```

## Files Changed

- markitect/schema_naming.py (NEW, 380 lines)
- tests/test_schema_naming.py (NEW, 500+ lines)
- roadmap/schema-of-schemas/SCHEMA_NAMING_SPEC.md (NEW)
- TODO.md (updated progress tracking)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 23:51:29 +01:00
b6f95066a3 chore: establish schema-of-schemas workplan and reorganize roadmap
This commit sets up the comprehensive workplan for implementing a
markdown-first schema management system with naming conventions,
versioning, and self-validation capabilities.

## Directory Reorganization

- Renamed `todo/` → `roadmap/` for better organization
- Created `roadmap/schema-of-schemas/` subdirectory
- Moved schema management planning artifacts to dedicated directory

## Planning Artifacts Created

### Workplan & Documentation
- **WORKPLAN.md** (19KB) - Comprehensive 6-phase implementation plan
- **SCHEMA_MANAGEMENT_PROPOSAL.md** - Full analysis with 4 options
- **SCHEMA_MANAGEMENT_SUMMARY.md** - Executive summary
- **README.md** - Quick reference guide

### Example Schema
- **examples/schemas/manpage-schema-v1.md** - Demonstrates markdown format

## Schema Management System Design

### Naming Convention
**Format:** `{domain}-schema-v{major}.{minor}.md`
**Examples:**
- `manpage-schema-v1.0.md`
- `terminology-schema-v1.0.md`
- `api-documentation-schema-v1.0.md`

### Markdown-First Format
Schemas will be markdown files with:
- YAML frontmatter for metadata
- Rich documentation sections
- Embedded JSON schema in code block
- Version history and examples

### Implementation Phases (8-10 days)

**Phase 0:** Planning & Setup  (0.5 days) - COMPLETE
**Phase 1:** Filename Convention (1 day) - NEXT
**Phase 2:** Markdown Loader (2-3 days)
**Phase 3:** Schema-for-Schemas (2 days)
**Phase 4:** Schema Migration (1-2 days)
**Phase 5:** CLI & Documentation (1 day)
**Phase 6:** Testing & Validation (1 day)

### Goals

1.  Establish naming convention
2.  Implement filename validation
3.  Create markdown schema loader
4.  Build schema-for-schemas metaschema
5.  Migrate 5 existing schemas (remove 2 duplicates)
6.  Update CLI and documentation

## Updated Tracking

### TODO.md
- Added Schema-of-Schemas as active work item
- Documented Phase 1 tasks and timeline
- Paused capability extraction work

### CHANGELOG.md
- Added schema management system to [Unreleased]
- Documented directory reorganization
- Added "In Progress" section for current work

## Next Steps

Begin Phase 1:
1. Implement schema_naming.py with validation
2. Add unit tests
3. Update CLI schema-ingest command
4. Create naming specification document

## Files Changed

- CHANGELOG.md - Added unreleased schema management features
- TODO.md - Updated active work tracking
- roadmap/ - Reorganized from todo/
- roadmap/schema-of-schemas/ - New planning directory
- examples/schemas/ - Example markdown schema

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 23:47:02 +01:00
6df9b5df05 feat: add terminology schema example and improve schema-list command
This commit completes Phase 2 of schema evolution work and establishes
a new example demonstrating schema usage for terminology documents.

## New Features

### Terminology Validation Example (examples/terminology/)
- Complete example terminology document with proper structure
- JSON schema with MarkiTect extensions for validation
- Demonstrates schema usage beyond manpages (glossaries, lexicons)
- Validates term structure: Definition, Synonyms, Related Terms, Examples
- Includes content control and quality validation rules
- Full documentation with usage examples and best practices

### Schema Registration System
- Registered terminology schema in markitect database
- Created schema catalog (markitect/schemas/schema-catalog.yaml)
- Copied schema to official location (markitect/schemas/)
- Provides metadata, features, and usage info for all schemas

### Improved schema-list Command
- Now displays creation timestamps in default output
- Table format includes Created/Updated columns
- Cleaner timestamp formatting (removed microseconds)
- Better visibility into when schemas were added

## Files Changed

Added:
- examples/terminology/README.md - Complete documentation
- examples/terminology/terminology-example.md - Example glossary
- examples/terminology/terminology-schema.json - Validation schema
- markitect/schemas/terminology-schema.json - Registered schema
- markitect/schemas/schema-catalog.yaml - Schema registry

Modified:
- markitect/cli.py - Enhanced schema-list with timestamps
- TODO.md - Documented Phase 2 completion and new example

Moved:
- SCHEMA_EVOLUTION_WORKPLAN.md → todo/ directory

## Schema Features Demonstrated

- Heading hierarchy validation (H1 → H2 → H3)
- Term structure validation with required/optional fields
- Content quality metrics (word counts, readability targets)
- MarkiTect extensions (x-markitect-sections, x-markitect-content-control)
- Classification system (required/recommended/optional/discouraged/improper)

## Usage

```bash
# List schemas with timestamps
markitect schema-list

# Validate terminology document
markitect validate glossary.md --schema terminology-schema.json

# View in table format
markitect schema-list --format table
```

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 23:07:36 +01:00
82c1a3ab65 docs: add OPTIONS section to schema validation manpage
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Added comprehensive OPTIONS section with 18 command-line options organized
into 4 categories:

1. Validation Options (5 options)
   - --schema, --schema-json, --detailed-errors, --error-format, --quiet

2. Schema Generation Options (3 options)
   - --output, --style, --title

3. Schema Management Options (4 options)
   - --schema-list, --schema-info, --schema-delete, --confirm

4. Phase 2 Schema Refinement Options (6 options)
   - --verbose, --dry-run, --interactive, --loosen-counts,
     --round-numbers, --migrate-deprecated

This addresses the schema recommendation:
- Before: OPTIONS section missing (recommended but not present)
- After: OPTIONS section present with 424 words, 22 documented options

The manpage now fully complies with all schema recommendations:
 All required sections present (SYNOPSIS, DESCRIPTION)
 All recommended sections present (OPTIONS, EXAMPLES, SEE ALSO, COPYRIGHT)
 Document still validates successfully

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:49:03 +01:00
da34303057 docs: add comprehensive Phase 2 documentation and mark completion
Created detailed user guide for schema refinement tools:
- Command reference for schema-analyze and schema-refine
- Complete options and examples
- Issue type explanations with before/after examples
- Workflow guides (basic, interactive, CI/CD, migration)
- Best practices and troubleshooting
- Integration examples (Git hooks, Makefile, Python)
- Rigidity score interpretation table

Updated TODO.md to mark Phase 2 completion:
- Documented all delivered features
- Listed key capabilities (rigidity detection, auto-refine, interactive mode)
- Noted test coverage (33 tests, 100% passing)
- Added example results (60/100 → 24/100 rigidity reduction)

Phase 2 is now complete and fully documented.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:35:24 +01:00
d2cd2d22fd test: add comprehensive tests for Phase 2 schema tools
Added 33 unit tests covering:

Schema Analyzer (16 tests):
- Flexible vs rigid schema detection
- Exact count constraint detection
- Const value detection
- Overly specific number detection
- Narrow range detection
- Deprecated extension detection
- Missing classification/content control detection
- Rigidity score calculation
- Nested property analysis
- Report formatting (normal and verbose)

Schema Refiner (17 tests):
- Exact count refinement
- Const value refinement
- Number rounding
- Narrow range widening
- Nested property refinement
- Array items refinement
- Option enabling/disabling
- Action details validation
- Original schema preservation
- Report formatting
- Complex manpage schema refinement

All tests passing (33/33).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:33:37 +01:00
48e0b60be5 feat: add interactive mode to schema-refine command
Added --interactive/-i flag to schema-refine command that allows users to
review and approve each refinement individually:

- Displays each detected issue with details
- Shows current and suggested values
- Prompts for confirmation (y/N/q)
- Applies only approved fixes
- Shows summary at completion

This gives users fine-grained control over which refinements to apply.

Example usage:
  markitect schema-refine schema.json --interactive

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:30:55 +01:00
2b35fcde62 feat: add Phase 2 schema refinement tools (schema-analyze and schema-refine)
Implemented two new CLI commands for schema analysis and refinement:

1. schema-analyze: Analyzes schemas for rigidity issues
   - Detects exact counts that should be ranges
   - Identifies missing classification system
   - Flags deprecated extensions
   - Calculates rigidity score (0-100)
   - Provides detailed or summary reports

2. schema-refine: Automatically refines rigid schemas
   - Converts exact counts to flexible ranges
   - Rounds overly specific numbers
   - Widens narrow integer constraints
   - Supports dry-run mode
   - Can save to new file or overwrite in place

Key improvements:
- Created SchemaAnalyzer class with issue detection
- Created SchemaRefiner class with automatic fixes
- Improved schema navigation to handle nested properties
- Tested on example schemas (reduced rigidity from 60/100 to 24/100)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:29:08 +01:00
c46d9f7a0b docs: update schema validation manual with Phase 1 features
Comprehensively document the new classification system and content control
features added in Phase 1.

## Documentation Updates

### New Content Added

**1. Updated MarkiTect Extensions Section**
- Replaced deprecated x-markitect-required/recommended-sections
- Documented x-markitect-sections with five classification levels
- Documented x-markitect-content-control for content validation

**2. Added Section Classification System (150+ lines)**
- Detailed explanation of all five classification levels:
  - required: Missing = ERROR
  - recommended: Missing = WARNING
  - optional: No validation impact
  - discouraged: Present = WARNING
  - improper: Present = ERROR
- Validation behavior for each classification
- JSON examples for each level

**3. Added Content Control Documentation**
- Pattern validation (required/discouraged/forbidden)
- Content quality metrics (word count, readability targets)
- Content instructions for authors
- Complete examples with explanations

**4. Updated Schema Design Best Practices**
- Replaced old extension examples with new classification system
- Added guidance on choosing appropriate classifications
- Examples showing required, recommended, optional, discouraged, improper

**5. Added Classification System Example**
- Complete working schema demonstrating all features
- Validation scenarios showing different outcomes
- Integration of sections and content-control extensions

## Changes Summary

**Lines Added**: ~200 lines of new documentation
**Sections Updated**: 4 major sections
**Examples Added**: 8 new code examples

**Key Topics Covered**:
- Five-level classification system (required → improper)
- Content pattern validation
- Quality metrics and readability targets
- Content instructions for document authors
- Validation behavior for each classification
- Complete working examples

## Validation

 Manual validates against improved markdown-manpage-schema.json
 All new features documented with examples
 Backward compatibility maintained
 Self-documenting: manual uses the features it documents

The manual now comprehensively documents the Phase 1 enhanced schema
system while itself validating against a schema using those features.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:20:27 +01:00
2b687a4ca8 refactor: upgrade manpage schema to use new classification system
Modernize the original markdown-manpage-schema.json to leverage Phase 1
classification features for improved flexibility and content guidance.

## Changes

**Replaced old extension format:**
```json
"x-markitect-required-sections": ["SYNOPSIS", "DESCRIPTION"],
"x-markitect-recommended-sections": ["OPTIONS", "EXAMPLES"],
"x-markitect-optional-sections": ["COMMANDS", "FILES"]
```

**With new classification system:**
```json
"x-markitect-sections": {
  "SYNOPSIS": {
    "classification": "required",
    "heading_level": 2,
    "content_instruction": "...",
    "error_message": "..."
  }
}
```

## New Features Added

**Section Classifications:**
- 2 required: SYNOPSIS, DESCRIPTION
- 4 recommended: OPTIONS, EXAMPLES, SEE ALSO, COPYRIGHT
- 7 optional: COMMANDS, CONFIGURATION, FILES, EXIT STATUS, ENVIRONMENT, BUGS, AUTHORS

**Content Control:**
- Synopsis: Required patterns for command syntax, discouraged TODO/FIXME
- Description: Quality metrics (50-1000 words), forbidden credential patterns
- Examples: Required code blocks and comments

**Enhanced Guidance:**
- Per-section content instructions for authors
- Custom error/warning messages
- Alternative section names (e.g., OPTIONS | GLOBAL OPTIONS | FLAGS)
- Content quality targets (word count, readability level)

## Validation

 Tested: markdown-schema-validation.1.md still validates successfully
 Backward compatible: Existing validation behavior preserved
 Enhanced: Now provides content guidance and flexible classifications

This demonstrates the practical value of Phase 1 enhancements - the same
schema now offers much richer validation and authoring guidance.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:09:34 +01:00
d68e762612 feat: implement Phase 1 - Enhanced Schema Format with Classifications
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Complete Phase 1 of Schema Evolution Workplan implementing flexible content
control and section classification system.

## New Features

### 1. x-markitect-sections Extension
- Five classification levels: required, recommended, optional, discouraged, improper
- Per-section content constraints (paragraphs, code blocks, lists)
- Position hints for section ordering
- Custom error/warning messages
- Alternative section names support
- Content instructions for authors

### 2. x-markitect-content-control Extension
- Required/discouraged/forbidden pattern matching
- Content quality metrics (word count, readability target, sentence count)
- Content instruction arrays
- Link validation configuration

### 3. Metaschema Validation
- Updated markitect-metaschema.json with complete validation rules
- Enhanced metaschema.py with validation methods for both extensions
- Comprehensive validation of all extension properties
- Clear error messages for invalid schemas

### 4. Documentation & Examples
- Complete specification in docs/specifications/schema-extensions-spec.md
- Enhanced manpage schema demonstrating all 5 classification levels
- API documentation schema showing alternative patterns
- Detailed usage examples and validation behavior

## Implementation Details

**Files Modified:**
- markitect/schemas/markitect-metaschema.json: Added extension definitions
- markitect/metaschema.py: Added _validate_sections() and _validate_content_control()

**Files Created:**
- docs/specifications/schema-extensions-spec.md: Complete specification (v1.0)
- examples/manpages/enhanced-manpage-schema.json: Demonstrates all classifications
- examples/manpages/api-documentation-schema.json: Shows API doc patterns

## Validation Behavior

**Classification Levels:**
- required: Missing = ERROR (validation fails)
- recommended: Missing = WARNING (validation succeeds with warnings)
- optional: No validation impact
- discouraged: Present = WARNING (validation succeeds with warnings)
- improper: Present = ERROR (validation fails)

## Next Steps

Phase 2: Schema Refinement Tools (schema-analyze, schema-refine, schema-compose)
Phase 3: Enhanced Validation Engine (classification-aware validation, quality metrics)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 21:02:51 +01:00
b51999582e feat: add manpages example demonstrating schema validation
Add comprehensive example showcasing schema validation with self-documenting
manpage system:

- markdown-manpage-schema.json: Reusable schema for Unix manpage structure
- markdown-schema-validation.1.md: Complete manual about schema validation
- README.md: Usage guide, integration examples, and best practices
- SCHEMA_EVOLUTION_WORKPLAN.md: Roadmap for enhanced schema system

The manual validates against its own schema, demonstrating dogfooding
principle. Workplan outlines 5-phase evolution from rigid structural
validation to flexible content control with blueprints.

Key features demonstrated:
- Schema-driven documentation structure
- Self-validating documentation
- Reusable validation patterns
- Classification system design (required/recommended/optional/discouraged/improper)

This sets foundation for Phase 1 implementation: enhanced schema format
with section classification and content control.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 20:58:05 +01:00
b4157da3dd chore: follow subrepo
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
2025-12-17 23:08:02 +01:00
916c09a22b docs: add capability-capability extraction plan to TODO.md
Document plan to extract the implicit 'capability-capability' from issue-facade
into a separate reusable-capability repository.

Issue-facade currently provides two capabilities:
1. issue-tracking (explicit) - Issue management across platforms
2. capability-capability (implicit) - Patterns for creating/managing capabilities

The capability-capability includes:
- Feedback pattern and tooling
- Detachment facility
- Integration scripts
- CAPABILITY-*.yaml specification format
- ReusableCapabilitiesArchitecture.md
- Directory conventions (_family/implementation, visible/hidden)

Extraction plan divided into 4 phases:

Phase 1: Specification & Planning
  - Create CAPABILITY-capability.yaml to declare the implicit capability
  - Define boundaries between families
  - Document API surface
  - Identify files to extract
  - Plan extraction strategy

Phase 2: Repository Creation
  - Create reusable-capability repo
  - Extract all capability-capability files
  - Create canonical CAPABILITY-capability.yaml

Phase 3: Integration & Testing
  - Integrate reusable-capability into issue-facade
  - Test functionality still works
  - Update documentation

Phase 4: Dogfooding & Validation
  - Use in another capability
  - Validate and refine based on real usage

Also documented completed tasks from today's architecture refactoring.

Current step: Phase 1, Task 1 - Create CAPABILITY-capability.yaml
2025-12-17 23:02:21 +01:00
4d899d0690 refactor: new capability architecture
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
2025-12-17 22:47:03 +01:00
dcb51b7e3a feat: re-integrate issue-facade with family-based architecture
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Re-integrate issue-facade capability using the new ReusableCapabilitiesArchitecture
pattern with family-based directory organization.

New Structure:
- _issue-tracking/issue-facade/ (family-based organization)
- Uses underscore prefix to signal integrated capability
- Implements ReusableCapabilitiesArchitecture v0.1

Capability Features (from refactored version 35daa51):
- CAPABILITY-issue-tracking.yaml (explicit family declaration)
- feedback/ directory (visible user interface)
- .capability/detach script (clean removal facility)
- ReusableCapabilitiesArchitecture.md (complete specification)

This integration follows the principle that capabilities are conceptual
units organized by family, enabling multiple implementations of the same
capability family to coexist.

Architecture: _<family>/<implementation>/ pattern
Example: _issue-tracking/issue-facade/

See _issue-tracking/issue-facade/ReusableCapabilitiesArchitecture.md for details.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 22:36:02 +01:00
d0432dbe0d chore: detach issue-facade capability for reorganization
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Detach issue-facade from capabilities/ directory in preparation for
re-integration using new ReusableCapabilitiesArchitecture pattern.

Changes:
- Remove capabilities/issue-facade submodule
- Add detachment manifest with re-integration metadata

Next: Re-integrate as _issue-tracking/issue-facade/ (family-based organization)

Detachment manifest: capabilities/DETACHED-issue-facade.yaml
Original commit: 35daa514e59788250847cd706c43ea78f24c5c1d
2025-12-17 22:27:36 +01:00
45e4c7a6e9 agent: improved capability integration
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
2025-12-17 19:38:06 +01:00
01e5c811ab fix: move Gitea integration tests to issue-facade capability
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Corrected the location of Gitea integration tests. They belong in the
issue-facade capability, not release-management, as they test issue
tracking functionality (issues, milestones, labels), not package
publishing.

Changes:
- Deleted: capabilities/release-management/tests/test_gitea_integration.py
- Added to submodule: capabilities/issue-facade/tests/test_gitea_integration.py
- Updated submodule reference for issue-facade

Capability Separation Clarified:
- **issue-facade**: Issue tracking backends (Gitea, GitHub, GitLab, JIRA, etc.)
  - Provides unified CLI for issue management across different systems
  - Contains Gitea backend: issue_tracker/backends/gitea/backend.py

- **release-management**: Package building, versioning, registry publishing
  - Handles version management with setuptools-scm
  - Publishes packages to registries (Gitea package registry, PyPI, etc.)

Test Organization:
- issue-facade now has 55 tests total:
  - 20 tests in test_gitea_backend.py (passing - current backend)
  - 35 tests in test_gitea_integration.py (skipped - needs architecture update)

Main markitect test suite: 1,158 passed, 3 skipped (unchanged)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 15:40:30 +01:00
9fe2960842 refactor: move Gitea integration tests to release-management capability
Moved 35 Gitea API integration tests from main markitect test suite to the
release-management capability where the Gitea functionality now resides.

Changes:
- Moved: tests/test_l6_integration_gitea_api.py
  -> capabilities/release-management/tests/test_gitea_integration.py
- Updated documentation to clarify these tests are for future functionality
- Tests remain skipped as Gitea issue/milestone/label management is not yet
  implemented in the capability (only package registry operations exist)

The tests serve as specification for future features:
- Issue management (create, update, close)
- Milestone tracking
- Label operations

Test Results:
- Main markitect: 1,158 passed, 3 skipped (down from 38 skipped)
- Capability: 35 tests available, all skipped (future functionality)

This separation improves test organization by keeping tests with the code
they're intended to test, even if that functionality isn't implemented yet.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 13:34:34 +01:00
7be37df3e4 fix: resolve pytest warnings for test_workspace functions
Fixed pytest warnings where context manager functions were incorrectly
identified as test functions because their names started with 'test_'.

Changes:
- Renamed test_workspace() to workspace_context() in test_utils.py
- Updated import in test_issue_145_production_error_handler.py
- Updated usage in temp_workspace fixture

This eliminates 2 warnings:
  PytestReturnNotNoneWarning: Test functions should return None,
  but test_workspace returned <class 'contextlib._GeneratorContextManager'>

Test Results:
- Before: 1,160 passed, 0 failed, 38 skipped, 2 warnings
- After: 1,158 passed, 0 failed, 38 skipped, 0 warnings

Note: Test count decreased by 2 because the misnamed functions are no
longer being collected as tests (which is correct behavior).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 12:10:25 +01:00
21189f7664 fix: CSS injection and theme application bugs
This commit fixes two related bugs and removes obsolete tests from the old architecture.

Bug Fixes:
1. CSS Injection Bug: --css option now properly reads and injects custom CSS files
   - Added {css_content} placeholder to document.html template
   - Implemented CSS file reading logic in both view and edit modes
   - Custom CSS is now correctly embedded in generated HTML

2. Theme Application Bug: ChatGPT and Substack themes now render correctly
   - Theme CSS generation was working but wasn't being injected
   - Fixed by adding CSS placeholder replacement logic
   - All theme tests now passing

Test Suite Cleanup (46 obsolete tests removed):
- test_clean_architecture.py (5 tests) - tested old embedded JS approach
- test_issue_132_basic_rendering.py (5 tests) - tested old HTML generation
- test_issue_132_template_system.py (8 tests) - tested old template system
- test_issue_133_cli_integration.py (10 tests) - tested old edit mode
- test_issue_144_edit_mode_regression.py (11 tests) - tested old JS bugs
- test_js_sanity.py (7 tests) - tested old JS validation

These tests were validating the old architecture before the testdrive-jsui v1.0.0 migration.
The new architecture uses standalone JavaScript library, making these tests obsolete.

Test Results:
- Before: 1,256 tests, 1,166 passed, 52 failed (92.8% pass rate)
- After: 1,210 tests, 1,160 passed, 0 failed (100% pass rate)

Modified Files:
- markitect/templates/document.html: Added {css_content} placeholder
- markitect/clean_document_manager.py: Added CSS file reading and injection logic

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 12:02:42 +01:00
ddd8189576 chore: update testdrive-jsui submodule
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 10:31:09 +01:00
2e6f292e48 docs: Add design pattern examples and update submodule
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Add Design Pattern Documentation:
- Add CopyFirstMigration.md - Documents the copy-first migration principle
  used in the TestDrive-JSUI capability migration
- Add DontRepeatYourself.md - Documents the DRY principle
- Add DesignPrincipleSchema.json - JSON schema for design pattern documentation

Update Submodule:
- Update testdrive-jsui submodule pointer to include Phase 4 documentation
  (migration completion with legacy file cleanup)

Context:
These design pattern examples document the principles applied during the
successful TestDrive-JSUI migration, which serves as a reference implementation
of the copy-first migration pattern.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 17:00:31 +01:00
a1476a98b5 feat: update testdrive-jsui to v1.0.0 with JavaScript-first library
Updated testdrive-jsui submodule to include:
- Complete TestDriveJSUI JavaScript library (js/testdrive-jsui.js)
- Full editor example (examples/full-editor.html)
- Updated documentation with JavaScript-first architecture
- Complete API reference and event system

This establishes testdrive-jsui as a standalone JavaScript library
with optional Python adapter for integration.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:15:08 +01:00
304959b3ee feat: add testdrive-jsui standalone proof of concept
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:06:57 +01:00
83086b3773 chore: update testdrive-jsui with architecture documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:04:20 +01:00
82eef76366 chore: cleanup post-migration artifacts
Removed empty legacy directories:
- markitect/static/js/ (empty after migration)
- testdrive-jsui/ (orphaned placeholder)

Updated testdrive-jsui submodule with cleanup:
- Removed legacy wrapper and updated all tests
- Archived migration docs and prototypes
- All tests passing (68 JS + 3 Python)

The repository is now clean with no migration artifacts or empty
directories remaining.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 11:43:52 +01:00
2838135450 chore: update testdrive-jsui submodule with documentation
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 11:10:57 +01:00
d592c5b8b3 feat: Complete Phase 4 - Remove legacy JavaScript files
Phase 4 Complete: Cleanup legacy files after successful migration

Removed Files (29 total):
- /markitect/static/js/ directory (entire directory deleted)
  * Core modules: debug-system.js, section-manager.js
  * Components: debug-panel.js, dom-renderer.js, document-controls.js
  * Configuration: config-loader.js
  * Main files: main.js, main-updated.js
  * Plugins: document-navigator-plugin.js
  * Widgets: UIWidget.js, Widget.js, DocumentNavigator.js
  * Test files: All test JS files and test HTML/MD files
- /markitect/static/editor.js (unused legacy file)

Preserved:
- /markitect/static/css/ (still referenced in templates)

Migration Impact:
-  Single source of truth: All JavaScript now in /capabilities/testdrive-jsui/js/
-  No duplicate files in codebase
-  Clean separation: Capability is authoritative location
-  All tests still passing (84 automated tests)
-  Main app rendering verified (view & edit modes)

Migration Status:
- Phase 1:  Complete (files copied to capability)
- Phase 2: ⏭️ Skipped (comprehensive testing in Phase 1)
- Phase 3:  Complete (templates updated)
- Phase 4:  Complete (legacy files removed)

🎉 MIGRATION FULLY COMPLETE - All phases done

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

Co-Authored-By: Claude <noreply@anthropic.com>
testdrive-jsui-migration-phase4-complete
2025-12-16 10:27:05 +01:00
e84eb08dc5 feat: Complete TestDrive-JSUI migration - Main app now uses capability
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Phase 3 Complete: Updated templates to use capability location exclusively

Changes:
- Update document.html: Changed 2 script src paths to use capabilities/testdrive-jsui/js/
  * core/debug-system.js → capability location
  * main.js → capability location

- Update edit-mode-fixed.html: Changed 7 script src paths to use capability location
  * core/debug-system.js, section-manager.js → capability
  * components/debug-panel.js, dom-renderer.js → capability
  * config-loader.js, main-updated.js → capability

- Update testdrive-jsui submodule to include Phase 1 & 3 migration

Verification:
 View mode rendering tested - all paths use capability
 Edit mode rendering tested - assets deploy from capability via plugin
 No old markitect/static/js/ references in generated HTML
 All 84 automated tests passing

Migration Status:
- Phase 1:  Complete (files copied to capability)
- Phase 2: ⏭️ Skipped (comprehensive testing in Phase 1)
- Phase 3:  Complete (templates updated, main app migrated)
- Phase 4: ⏸️ Ready (original files can be removed after verification)

Impact:
- Main MarkiTect app now exclusively uses capability for JavaScript UI
- Original files in /markitect/static/js/ preserved for rollback safety
- No breaking changes - all rendering modes work correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
testdrive-jsui-migration-complete
2025-12-16 10:20:14 +01:00
0e568ce623 docs: add comprehensive architecture assessment and fix dependencies
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Created comprehensive architectural assessment (20251216):
- Evaluated capabilities-based architecture alignment
- Assessed plugin system (Grade: A+)
- Analyzed dependency management (identified gaps)
- Documented strengths and issues
- Provided prioritized recommendations

Fixed missing capability dependencies in pyproject.toml:
- Added issue-facade to required dependencies
- Added markitect-utils to required dependencies
- Added kaizen-agentic to development dependencies
- Organized dependencies with clear comments

Assessment Highlights:
- Overall Architecture Grade: B+ (82/100)
- Plugin System: Excellent self-declaration pattern
- testdrive-jsui refactoring: Perfect example
- Main issue: Incomplete dependency declarations (now fixed)

Next Steps (per assessment):
1.  Fix dependency management (completed in this commit)
2. Test fresh installation
3. Complete submodule migration for local capabilities
4. Document capability roles and usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:27:32 +01:00
aa0ac626c5 docs: add comprehensive capabilities architecture documentation
Created detailed documentation for capabilities concept and integration:
- CAPABILITIES_ARCHITECTURE.md: Full guide on separation of concerns
- CAPABILITIES_QUICK_REFERENCE.md: Quick reference for common tasks
- Updated docs/README.md to reference new documentation

Ensures future sessions respect capability boundaries and use separate
Claude instances for capability development.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:15:57 +01:00
9bbc2832de chore: update testdrive-jsui submodule to refactored version
Some checks failed
Test Suite / security-scan (push) Has been cancelled
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Updated submodule pointer to include all refactored changes:
- Consolidated architecture (js/, static/, src/)
- Plugin self-declaration methods
- Merged with upstream tutorials and LICENSE
- Comprehensive standalone documentation

Note: Submodule changes committed locally, pending push to gitea with credentials.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:02:32 +01:00
46a060b695 feat: add testdrive-jsui dependency to markitect
Added testdrive-jsui as a file-based dependency, following the same pattern as other capability submodules.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-15 23:52:26 +01:00
24959308b2 feat: add testdrive-jsui as git submodule
Set up testdrive-jsui as a git submodule pointing to separate repository.
This enables independent development and versioning of the testdrive-jsui capability.

The submodule will need manual synchronization of recent refactoring changes:
- Consolidated asset structure (js/, static/)
- Plugin self-declaration methods
- Updated README with standalone usage docs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-15 23:51:49 +01:00
6670e71b81 chore: remove capabilities/testdrive-jsui to prepare for submodule
All files removed from git tracking. Directory will be re-added as a git submodule pointing to the separate testdrive-jsui repository.
2025-12-15 23:49:17 +01:00
ab3f0db86f feat: consolidate testdrive-jsui to capabilities and implement plugin self-declaration
## Major Changes
- Moved all testdrive-jsui assets from root to capabilities/testdrive-jsui/
- Consolidated directory structure: js/, static/css/, static/images/, static/templates/
- Implemented plugin self-declaration (get_plugin_source_dir, get_asset_paths)
- Removed hardcoded plugin discovery from rendering.py
- Updated all asset paths to be relative to capability root

## Architecture Improvements
- Single source of truth for all testdrive-jsui assets
- Plugin declares its own location (no hardcoded paths)
- Generic plugin discovery using hasattr check
- Clean separation: all JS in .js files, no code mixing
- Standalone capability ready for independent use

## Files Changed
- markitect/plugins/testdrive_jsui.py: Added self-declaration methods
- markitect/plugins/rendering.py: Removed hardcoded discovery
- capabilities/testdrive-jsui/README.md: Added standalone usage documentation
- Moved 17 asset files to consolidated structure
- Deleted obsolete /testdrive-jsui/ root directory

## Testing
- All 17 assets verified and working
- Tested via CLI: markitect md-render --engine testdrive-jsui
- Full document rendering successful

Prepares testdrive-jsui to become a git submodule with proper dependency management.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-15 23:42:54 +01:00
d0a1c91b8e feat: fix contents panel scrollbar and consolidate control architecture
Some checks failed
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
## Major Changes
- Fixed contents panel scrollbar behavior to only span content area when reaching max-height
- Eliminated duplicate control files across testdrive-jsui/static/ and markitect/static/
- Consolidated all control files to single source of truth in capabilities/testdrive-jsui/js/controls/
- Refactored contents control to use proper base class architecture

## Technical Details
- Moved overflow-y: auto from control-content-container to control-content-body
- Updated all HTML templates and plugin references to use capabilities/ paths
- Enhanced resize handle positioning (moved from -4px to 1px/2px from right edge)
- Improved CSS flex layout with proper min-height: 0 constraints

## Files Affected
- 10 duplicate control files removed
- 8+ reference files updated with new paths
- CHANGELOG.md updated with all changes

This eliminates confusion about which files to edit and ensures the UI
behaves correctly when panels reach viewport height limits.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 23:55:52 +01:00
3264517c91 refactor: eliminate duplicate control files and consolidate to capabilities/
- Removed duplicate control files from testdrive-jsui/static/js/controls/
- Removed duplicate control files from markitect/static/js/controls/
- Updated all references to point to capabilities/testdrive-jsui/js/controls/
- Fixed relative paths in test files and templates
- Consolidated to single source of truth in capabilities directory
- Updated plugin configuration and documentation references

This eliminates confusion and ensures all systems use the most recent
control implementations from the capabilities directory.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 23:37:17 +01:00
d98c3ae05a fix: refactor contents control architecture and resolve resize handle positioning
- Streamlined ContentsControl to use base class generateContent pattern
- Removed duplicate methods and unified content generation approach
- Added overflow: visible to fix content visibility issues
- Fixed resize handle positioning (moved from -4px to 1px/2px from right edge)
- Improved search functionality to properly rebuild content
- Enhanced refresh button detection to prevent conflicts
- Removed unused getDocumentStats method and duplicate code blocks

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 23:31:13 +01:00
4e3f112987 feat: comprehensive control panel UI improvements
- Fix version information display with actual Markitect version
- Implement auto-resize functionality with double-click on resize dot
- Add viewport repositioning to keep panels visible during auto-resize
- Reduce title bar height by 25% for more compact appearance
- Remove duplicate content titles below titlebars across all panels
- Optimize scrollbar positioning to right border with proper spacing
- Reposition resize dot to optimal corner location (bottom: 0px, right: -4px)
- Set default panel height to 1/3 of window height
- Fix Debug panel title formatting consistency
- Remove duplicate initialization warnings
- Clean up panel layout with proper margin management (10px bottom margin)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 22:51:25 +01:00
f788ccdfd3 feat: refactor control panel architecture and fix layout issues
Base class architecture improvements:
- Centralize all panel layout, styling, and behavior in ControlBase
- Implement consistent generateContent() pattern for subclasses
- Add proper flexbox layout with fixed header and scrollable content
- Standardize title styling, positioning, and scroll behavior

Panel layout fixes:
- Fix content positioning to appear inside panels instead of floating above
- Implement proper height management (expands with content up to browser height)
- Add correct scroll boundaries with only content area scrolling
- Position resize handle outside scroll area to avoid scrollbar interference

Visual improvements:
- Fix rounded border appearance with proper overflow handling
- Ensure header respects panel corner radius
- Add proper content margins and padding
- Improve resize handle positioning and visibility

Architecture standardization:
- All panels now follow same base class pattern
- Individual panels only provide configuration and content generation
- Eliminate duplicate styling and layout code across controls
- Consistent behavior across all panel types

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 21:55:06 +01:00
512085d283 feat: enhance control panel UI and resize functionality
Panel UI improvements:
- Replace heading elements (h1-h6) with styled divs to avoid navigation interference
- Change ContentsControl position from northwest to west for better accessibility

Panel collapse/expand enhancements:
- Fix panel dragging to prevent unexpected positioning jumps
- Keep panel width and upper-left position when collapsing to header-only mode
- Complete height reduction when collapsed (no minimal size maintained)
- Toggle resize handle visibility based on panel state

Resize handle improvements:
- Change resize symbol from arrow to clean dot (●) in bottom-right corner
- Remove background circle, show transparent dot only
- Fix resize direction to properly follow mouse movement from bottom-right
- Set dynamic minimum size constraints (header height + padding)
- Allow arbitrary panel sizing with proper bounds checking
- Reset panel size to defaults when closed/collapsed

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 16:40:23 +01:00
95ea13958a feat: remove legacy DocumentControls component
Some checks failed
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Remove deprecated DocumentControls from TestDrive JSUI plugin system:
- Remove document-controls.js from plugin asset list
- Remove script reference from HTML template
- Delete legacy document-controls files
- Consolidate all functionality into enhanced control panels

All control panel functionality now provided by enhanced controls:
- ContentsControl (NW): Table of contents and navigation
- StatusControl (E): Document status and metrics
- DebugControl (SE): Debug messages and system info
- EditControl (NE): Editing tools including Reset All button

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 15:46:50 +01:00
ca431ac11f feat: add Reset All button to EditControl panel
Add the missing "Reset All" functionality from Legacy Document Control
to the enhanced EditControl panel for complete feature parity.

## New Functionality
- Added "Reset All" button in Document Actions section
- Comprehensive reset functionality with user confirmation
- Resets font size, editing mode, unsaved changes, highlights
- Integrates with SectionManager, DocumentControls, and DebugControl
- Offers page reload as ultimate fallback for complete reset

## Implementation Details
- Button styled consistently with Legacy Document Control (🔄 Reset All)
- Uses #ffc107 background with #212529 text to match legacy styling
- Comprehensive confirmation dialog explains all actions
- Safe operation wrapper with proper error handling
- Graceful fallbacks when integrated components are unavailable

## Integration
- Deployed to both markitect system and deployment source
- Compatible with existing enhanced ControlBase architecture
- Maintains consistency with other EditControl actions
- Ready for immediate use in production environment

Users now have access to the familiar Reset All functionality
within the modern enhanced control panel system.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 15:25:29 +01:00