An advanced markdown engine
Find a file
tegwick 3222a474c9 fix: Correct database API usage in stats command - achieve 100% system health
Fixed the database connection error that was causing degraded system health by
using the proper DatabaseManager API instead of non-existent methods.

## Root Cause Analysis:
- **Issue**: `_show_core_system_stats()` tried to call `db_manager.get_connection()`
- **Problem**: DatabaseManager class doesn't have a `get_connection()` method
- **Impact**: System health reported as "Degraded (66.7%)" due to database unavailability

## Why No Tests Caught This:
1. **Existing tests** only test public API methods (`store_markdown_file`, `get_markdown_file`, etc.)
2. **No tests existed** for `get_connection()` because the method doesn't exist
3. **New stats function** was the first code to assume this method existed
4. **Database pattern**: Uses temporary connections per operation, not persistent connections

## Solution Applied:
- **Replaced** `conn = db_manager.get_connection()` with proper `execute_query()` API
- **Updated queries** to use named columns: `SELECT COUNT(*) as count FROM table`
- **Added resilience** for optional tables (schema_files) with try/catch
- **Result**: System health now reports  **100% Healthy**

## Changes Made:
```python
# Before (broken):
conn = db_manager.get_connection()
cursor.execute("SELECT COUNT(*) FROM markdown_files")
total_files = cursor.fetchone()[0]

# After (correct):
result = db_manager.execute_query("SELECT COUNT(*) as count FROM markdown_files")
total_files = result[0]['count'] if result else 0
```

## Current System Health:
```
🏥 System Health:  Healthy (100.0%)
   Healthy Subsystems: 3/3

🗄️  Database:  Available (56.0 KB) - 11 files processed
🗃️  Cache:  Available (0 B)
🖥️  AST Service:  Available
```

This fix demonstrates the value of the health monitoring system - it successfully
identified a real integration issue and provided clear diagnostic information.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 22:55:13 +02:00
.claude/agents feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
.github/workflows feat: Implement comprehensive Testing Architecture Enhancement 2025-09-26 22:36:35 +02:00
.venv_old chore: Keep old venv from ubuntu 18.04 for now just in case. 2025-09-23 01:16:12 +02:00
application feat: Implement domain logic separation with clean architecture 2025-09-26 22:15:45 +02:00
cli feat: Complete Issue #18 - Configuration and Environment Management CLI 2025-09-29 00:18:27 +02:00
config feat: Implement unified configuration management system 2025-09-26 17:45:56 +02:00
diary feat: Implement automatic git repository configuration detection for Gitea 2025-09-28 23:27:13 +02:00
docs feat: Complete Issue #13 - Cache Management CLI Commands MAJOR MILESTONE 2025-09-25 23:03:03 +02:00
domain fix: Eliminate all 111 test warnings by fixing root causes 2025-09-27 20:14:22 +02:00
gitea feat: Consolidate Gitea API access through unified integration layer 2025-09-28 23:44:51 +02:00
infrastructure fix: Eliminate all 111 test warnings by fixing root causes 2025-09-27 20:14:22 +02:00
markitect fix: Correct database API usage in stats command - achieve 100% system health 2025-09-30 22:55:13 +02:00
services feat: Complete type safety improvements for CLI and service layers 2025-09-27 09:02:31 +02:00
tddai feat: Consolidate Gitea API access through unified integration layer 2025-09-28 23:44:51 +02:00
tests feat: Establish CLI subsystem *-stats command naming convention 2025-09-30 22:13:07 +02:00
wiki@648d8247c4 feat: Update wiki submodule with latest MarkdownMatters specification 2025-09-30 21:02:00 +02:00
.env.tddai refactor: Make tddai framework project-agnostic and fix test configuration 2025-09-24 00:04:54 +02:00
.gitignore refactor: Separate CLI presentation from core business logic 2025-09-26 15:08:54 +02:00
.gitmodules Add wiki as submodule tracking main 2025-09-16 23:28:11 +02:00
ARCHITECTURAL_CHAOS_TESTING_ISSUE.md feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
ARCHITECTURE.md feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
CAPABILITIES.md feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
CONFIG.md feat: Enhance tddai configuration with auto-loading .env files 2025-09-24 22:53:27 +02:00
DATA_ACCESS_IMPROVEMENTS_GAMEPLAN.md feat: Implement domain logic separation with clean architecture 2025-09-26 22:15:45 +02:00
DIRECTORY_STRUCTURE_OPTIMIZATION_GAMEPLAN.md feat: Optimize Directory Structure Gameplan with professional-grade enhancements 2025-09-27 22:16:45 +02:00
DOMAIN_LOGIC_SEPARATION_DEMO.md feat: Implement domain logic separation with clean architecture 2025-09-26 22:15:45 +02:00
DOMAIN_LOGIC_SEPARATION_GAMEPLAN.md feat: Implement domain logic separation with clean architecture 2025-09-26 22:15:45 +02:00
ERROR_HANDLING_GUIDE.md docs: Add comprehensive error handling guidelines 2025-09-26 16:54:44 +02:00
FEATURES.md chore: Update features and issue lib 2025-09-26 17:19:16 +02:00
GITEA_INTEGRATION_CONSOLIDATION_GAMEPLAN.md feat: Consolidate Gitea API access through unified integration layer 2025-09-28 23:44:51 +02:00
gitea_issue_body.txt feat: Complete gitea integration test consolidation 2025-09-28 23:55:02 +02:00
install-claude.sh agent: Finally found a way to install claude again 2025-09-23 02:24:09 +02:00
install-cursor.sh chore: Try add cursor as alternative coding env 2025-09-25 01:59:11 +02:00
install-depends.sh build: Helpers to initially setup the dev env 2025-09-23 01:23:32 +02:00
install-nvm.sh build: Helpers to initially setup the dev env 2025-09-23 01:23:32 +02:00
install-pip.sh feat: Add Python dependency management and fix test environment 2025-09-23 02:41:32 +02:00
LEGACY_AGENT_GUIDE.md feat: Complete Issue #39 - Database CLI Reorganization with Comprehensive Legacy Compatibility System 2025-09-30 17:28:39 +02:00
LEGACY_COMPATIBILITY_SYSTEM.md feat: Complete Issue #39 - Database CLI Reorganization with Comprehensive Legacy Compatibility System 2025-09-30 17:28:39 +02:00
MAIN_BRANCH_OPTIMIZATION_GAMEPLAN.md docs: Add main branch optimization gameplan and priority assistant 2025-09-28 17:31:49 +02:00
Makefile feat: Add Issue Closing Make Target and Update Project Diary 2025-09-30 17:32:29 +02:00
NEXT.md feat: Issue #38 Phase 1 - Command Restructuring with db-data Implementation 2025-09-30 20:57:07 +02:00
ProjectDiary.md feat: Add Issue Closing Make Target and Update Project Diary 2025-09-30 17:32:29 +02:00
ProjectStatusDigest.md docs: Updated project documentation 2025-09-25 23:17:14 +02:00
pyproject.toml feat: Complete type safety improvements for CLI and service layers 2025-09-27 09:02:31 +02:00
README.md feat: Complete Issue #13 - Cache Management CLI Commands MAJOR MILESTONE 2025-09-25 23:03:03 +02:00
RelevantClaudeIssues.md docs: Document subagent infrastructure resolution and environment restoration 2025-09-23 02:58:36 +02:00
retrieved_roundtrip.md feat: Complete Issue #2 - Fast Document Loading & CLI Manipulation 2025-09-25 03:03:04 +02:00
ROADMAP.md feat: Complete Strategic Roadmap Implementation for HolyGrailRequirement 2025-09-25 14:08:42 +02:00
run_architectural_tests.py feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
run_randomized_tests.py feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
schema_summary.py feat: Complete Issue #3 - Schema Management with Enhanced Format Control 2025-09-30 02:59:43 +02:00
tddai-setup.sh refactor: Make tddai framework project-agnostic and fix test configuration 2025-09-24 00:04:54 +02:00
tddai_cli.py feat: Complete Issue #18 - Configuration and Environment Management CLI 2025-09-29 00:18:27 +02:00
tddai_issue_body.txt feat: Complete gitea integration test consolidation 2025-09-28 23:55:02 +02:00
TEST_ARCHITECTURE.md feat: Revolutionary Test Architecture - 7-Layer Organization with Advanced Testing Capabilities 2025-09-29 12:18:25 +02:00
test_frontmatter.md feat: Complete Issue #2 - Fast Document Loading & CLI Manipulation 2025-09-25 03:03:04 +02:00
test_roundtrip.md feat: Complete Issue #2 - Fast Document Loading & CLI Manipulation 2025-09-25 03:03:04 +02:00
test_status_report.md feat: Add make test-status for quick test overview without re-running 2025-09-23 03:16:50 +02:00
TESTING_ARCHITECTURE_ENHANCEMENT_GAMEPLAN.md feat: Implement domain logic separation with clean architecture 2025-09-26 22:15:45 +02:00
visualize_schema.py feat: Complete Issue #8 - Detailed Validation Error Reporting and CLI Enhancements 2025-09-29 21:21:21 +02:00

MarkiTect - Advanced Markdown Engine

Your Markdown, Redefined.

MarkiTect transforms markdown from plain text into intelligent, structured data with performance optimization, schema validation, and relational querying capabilities. Stop treating documentation as text files—start managing it as a database.

Key Features:

  • Lightning Performance: 60-85% faster document processing through intelligent AST caching
  • Schema Validation: Enforce document structure and consistency
  • Database Integration: Query markdown content with SQL-like operations
  • CLI Tools: Complete command-line interface for automation and workflows

📚 Documentation

Quick Start: Getting Started · Command Reference

Architecture: Caching System · Performance Philosophy

Development: TDD Workflow · Contributing

Project Status: Current Status · Roadmap · Next Actions