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
Separate capability-specific tests from core system tests to establish clear test organization and separation of concerns. ## Test Reorganization: - **markitect-content tests**: Moved 6 tests to capabilities/markitect-content/tests/ - **markitect-finance tests**: Moved 7 tests to markitect/finance/tests/ - **markitect-query tests**: Moved 1 test to markitect/query_paradigms/tests/ - **markitect-graphql tests**: Moved 2 tests to markitect/graphql/tests/ - **markitect-plugins tests**: Moved 2 tests to markitect/plugins/tests/ ## Makefile Updates: - **make test**: Excludes capability tests, runs only core system tests - **make test-capabilities**: Runs all capability tests - **make test-capability-***: Individual capability test targets - Updated all test targets (test-red, test-green, test-ultra-fast, test-perf) - Added capability test targets to help documentation ## Benefits: - Clear separation between core system tests and capability-specific tests - Faster core test execution (capability tests not run by default) - Individual capability testing for focused development - Supports future capability extraction workflow - Maintains capability test independence Test verification: - Core tests: 1291 tests (capability tests excluded) - Finance capability: 143 tests working independently - Content capability: 79 tests working independently 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
MarkiTect Content Capability
A self-contained capability for parsing and analyzing MarkdownMatters content without frontmatter and tailmatter zones.
Overview
The markitect-content capability provides content extraction and statistics functionality for MarkdownMatters documents. It cleanly separates main document content from metadata zones (frontmatter/tailmatter) and provides comprehensive content analysis.
Features
- Content Extraction: Extract main markdown content without frontmatter/tailmatter zones
- Content Statistics: Calculate word count, line count, paragraph count, and character count
- CLI Commands: Direct command-line access to content operations
- Contentmatter Preservation: Preserves inline metadata (MMD key-value pairs) as part of content
API
Core Classes
ContentParser
Main parser class for content extraction and analysis.
from markitect_content import ContentParser
parser = ContentParser()
# Extract content without matter zones
content = parser.extract_content(text)
# Calculate content statistics
stats = parser.calculate_stats(content)
ContentStats
Statistics data structure with content metrics.
from markitect_content import ContentStats
# Stats object contains:
# - word_count: int
# - line_count: int
# - paragraph_count: int
# - character_count: int
# Convert to dictionary
stats_dict = stats.to_dict()
CLI Commands
content-get
Extract content without frontmatter and tailmatter.
markitect content-get --file document.md
content-stats
Calculate content statistics.
markitect content-stats --file document.md --format json
markitect content-stats --file document.md --format text
Content Processing Rules
- Frontmatter Removal: Removes YAML frontmatter blocks (
---...---) - Tailmatter Removal: Removes tailmatter blocks (
yaml tailmatter...) - Contentmatter Preservation: Keeps inline MMD key-value pairs
- Content Statistics: Counts are calculated on cleaned content only
Installation
Install as an editable dependency in your MarkiTect environment:
pip install -e capabilities/markitect-content/
Testing
Run the capability test suite:
cd capabilities/markitect-content/
pytest tests/
Compliance
This capability follows the ComposableRepositoryParadigm:
- ✅ Src layout (PEP 660 compliant)
- ✅ Unidirectional dependencies
- ✅ Self-contained with own tests
- ✅ Independent configuration
- ✅ Clean API boundaries
Dependencies
- click>=8.0.0 (for CLI commands)
- pytest>=7.0.0 (dev dependency for testing)