/chronic

Documentation L2+ Production medium usage

/chronic

Overview

/chronic is a production command in the Documentation category of the Prismatic Platform that performs chronic documentation scanning and technical hygiene maintenance across the entire platform ecosystem. The command goes beyond simple documentation linting -- it provides intelligent validation of platform statistics, cross-reference integrity checking, quality gate synchronization, and git activity correlation to ensure that documentation accurately reflects the living state of the codebase.

Documentation drift is one of the most insidious forms of technical debt. Claims about agent counts, quality scores, file statistics, and architectural patterns become stale as the platform evolves, creating a growing gap between documented state and actual state. The /chronic command systematically detects and resolves this drift through automated validation intelligence that reduces manual verification time from 45+ minutes to under 5 minutes.

This command operates under the L2+ authority level and is executed by the chronic-scanner agent, coordinated by the documentation-validation-commander with support from the session-context-coordinator and git-integration-specialist. It is part of the platform's 216-command slash command registry, built on the AIAD (Autonomous Intelligence Agent Design) standard. Version 2.0.0 introduced automated validation intelligence based on learnings from ARCHER SUPREME documentation alignment sessions.

The chronic scanning approach treats documentation as a first-class engineering artifact subject to the same quality standards as production code. Every statistic cited in documentation is verified against the codebase. Every cross-reference link is validated for existence. Every quality score is confirmed against the latest gate execution results. This ensures that platform documentation maintains forensic-grade accuracy.

Architecture

The chronic scanning system uses a multi-agent validation architecture with four specialized subsystems.

Chronic Scanner (orchestrator)
    |
    +-- Statistics Validator
    |       |-- File counts (git ls-tree)
    |       |-- Agent counts (AIAD registry)
    |       |-- Command counts (command registry)
    |       |-- Quality scores (mix quality.gates)
    |
    +-- Cross-Reference Checker
    |       |-- Internal link validation
    |       |-- External URL checking
    |       |-- Glossary reference consistency
    |       |-- Agent/command name validation
    |
    +-- Git Activity Correlator
    |       |-- Commit history vs documented changes
    |       |-- File modification dates vs claims
    |       |-- Branch state verification
    |
    +-- Quality Gate Synchronizer
            |-- Score verification
            |-- Domain status checking
            |-- Warning count validation

Supporting Agents

AgentRole
documentation-validation-commanderPrimary orchestration and reporting
session-context-coordinatorSession file analysis and synthesis
git-integration-specialistGit activity correlation
quality-enforcement-commanderQuality gate synchronization

Usage

Basic Scanning

# Full documentation scan and validation
/chronic

# Automated validation with auto-fix and evidence report
/chronic validate --auto-fix --evidence-report

# Quick health check with maintenance suggestions
/chronic health-check --predict-discrepancies --maintenance-suggestions

Validation Operations

# Validate all claims across documentation
/chronic validate-all --auto-correct --evidence-trail

# Test documentation links and references
/chronic test-docs --link-validation --claim-verification --consistency-check

# Documentation debt analysis
/chronic debt-analysis --cross-reference-complexity --maintenance-overhead

Synchronization

# Sync documentation with platform state
/chronic sync-platform-state --live-update --cross-reference-check

# Git-aware documentation updates
/chronic git-sync --correlate-claims --evidence-generation

# Enhanced document synchronization
/chronic update --intelligent --scope breadth-first --auto-verify

Session Integration

# Analyze session context files
/chronic integrate-sessions --date 2025-12-03 --auto-synthesis

# Session pattern recognition
/chronic analyze-session-patterns --identify-improvements --dx-enhancement

# Context-aware documentation evolution
/chronic evolve-docs --context-driven --session-intelligence

Options & Parameters

ParameterTypeDefaultDescription
actionstringvalidateOperation: validate, sync, health-check, debt-analysis, test-docs
--auto-fixbooleanfalseAutomatically fix detected discrepancies
--auto-correctbooleanfalseApply corrections to documentation files
--evidence-reportbooleanfalseGenerate evidence trail for changes
--evidence-trailbooleanfalseFull provenance for each validation
--link-validationbooleanfalseValidate all internal and external links
--claim-verificationbooleanfalseVerify statistical and metric claims
--consistency-checkbooleanfalseCross-document consistency analysis
--scopestringallScan scope: all, breadth-first, specific path
--live-updatebooleanfalseReal-time synchronization mode
--predict-discrepanciesbooleanfalsePredict likely drift areas
--datestringnoneTarget date for session integration

Execution Flow

PHASE 1: DISCOVERY
    |-- Enumerate all documentation files
    |-- Load current platform state (git ls-tree)
    |-- Load quality gate results
    |-- Load AIAD registry state
    |
PHASE 2: CLAIM EXTRACTION
    |-- Parse statistics from CLAUDE.md
    |-- Extract metrics from session files
    |-- Identify cross-reference links
    |-- Catalog agent and command references
    |
PHASE 3: EVIDENCE COLLECTION
    |-- Run mix git_trees for file counts
    |-- Query AIAD registry for agent counts
    |-- Execute quality gates for scores
    |-- Analyze git log for activity claims
    |
PHASE 4: CROSS-REFERENCE VALIDATION
    |-- Match claims against evidence
    |-- Validate internal links
    |-- Check glossary references
    |-- Verify agent/command name accuracy
    |
PHASE 5: DISCREPANCY RESOLUTION
    |-- Classify discrepancies by severity
    |-- Apply auto-fixes if enabled
    |-- Generate correction proposals
    |-- Create evidence report
    |
PHASE 6: REPORTING
    |-- Compile validation report
    |-- Record audit trail
    |-- Emit telemetry events
    |-- Save to .claude/reports/

Validation Categories

CategoryWhat Is ValidatedEvidence Source
Platform StatisticsFile counts, agent counts, LOCgit ls-tree, AIAD index
Quality ScoresQuality gate results, domain statusmix quality.gates
Cross-ReferencesInternal links, glossary refsFile existence checks
Session ClaimsSession achievements, deliverablesGit diff, file inspection
Architecture ClaimsApp structure, dependency claimsmix deps.tree, app configs
Git ActivityCommit claims, change descriptionsgit log, git diff

Integration Points

ComponentRelationshipDetails
Prismatic AgentsExecuted by chronic-scanner agentMulti-agent validation
AIAD RegistryCommand specification and discoveryRegistry as evidence source
Quality GatesQuality score verificationGate results for claim validation
TelemetryCommand execution metricsScan event tracking
Git IntegrationActivity correlationChange detection and verification
Session ContextSession file analysis.claude/session-context/ scanning
Mix TasksMetric verificationVarious mix tasks for evidence

Best Practices

  1. Run Weekly: Execute /chronic validate-all at least weekly to catch documentation drift before it compounds. The longer drift goes undetected, the harder it is to correct.

  2. Enable Auto-Fix for Minor Issues: For discrepancies like outdated file counts or agent numbers, enable --auto-fix to automatically update documentation without manual intervention.

  3. Generate Evidence Reports for Audits: Use --evidence-report when preparing for releases or compliance reviews to create a verifiable audit trail of documentation accuracy.

  4. Integrate Session Analysis: After intensive development sessions, run /chronic integrate-sessions to extract patterns and improvements from session context files.

  5. Use Predictive Mode Proactively: The --predict-discrepancies flag identifies areas likely to drift based on recent git activity patterns, enabling proactive maintenance.

  6. Cross-Reference After Refactoring: Major refactoring operations often break documentation references. Run /chronic test-docs --link-validation after any significant code reorganization.

Error Handling

ErrorCauseResolution
QUALITY_GATES_UNAVAILABLEMix task not compiledRun mix compile first
GIT_TREE_ERRORGit repository issuesVerify git status and HEAD
LINK_BROKENReferenced file does not existUpdate or remove broken reference
METRIC_MISMATCHDocumented number differs from actualUpdate documentation or investigate cause
SESSION_FILE_CORRUPTMalformed session context fileRegenerate session context

Advanced Usage

Measurable Improvements from v2.0

MetricBefore (v1.0)After (v2.0)
Validation Speed45+ minutes (manual)< 5 minutes (automated)
Discrepancy DetectionManual review100% automated detection
Cross-Reference Accuracy95% manual99.9% automated
Platform SyncDaily manualReal-time automated
Context Loading44-file manual analysisAutomated synthesis

Predictive Documentation Health

# Predict which documentation files are likely stale
/chronic health-check --predict-discrepancies

# Output example:
# HIGH RISK:
#   CLAUDE.md (last updated 7 days ago, 23 commits since)
#   AGENT_REGISTRY.md (3 new agents not documented)
# MEDIUM RISK:
#   apps/prismatic_web/CLAUDE.md (5 file changes undocumented)
# LOW RISK:
#   docs/architecture/storage.md (no recent changes)

Documentation Testing Pipeline

# Full documentation test suite
/chronic test-docs --link-validation --claim-verification --consistency-check

# Output:
# Links: 1,247 validated, 3 broken
# Claims: 89 verified, 2 discrepancies
# Consistency: 45 cross-refs checked, 1 inconsistency

Performance

MetricValueNotes
Quick Health Check< 30 secondsBasic existence and syntax
Full Validation3-5 minutesComplete cross-reference
Link Validation1-2 minutesAll internal links
Session Analysis30-60 secondsPer session file
Auto-Fix Application< 10 secondsPer discrepancy

Doctrine Compliance

All commands operate under the NO MERCY, NO DOUBTS doctrine:

  • NO MERCY: Zero tolerance for documentation drift. Discrepancies between documented and actual state are treated as defects that must be resolved immediately.
  • NO DOUBTS: Full investigation before action, evidence-based results. Every validation is backed by concrete evidence from the codebase, git history, or runtime metrics.

The command implements the NABLA framework's Provenance Mandatory axiom: all documented claims must be traceable to verifiable evidence sources with forensic-grade accuracy.

  • /find-lowfruit - Identify low-hanging fruit improvements across codebase
  • /scan-mycelium - Mycelial pattern scanning across documentation and code
  • /propagate-pattern - Propagate successful patterns across the ecosystem
  • /check - Verification and integrity checking command
  • /compress - Intelligent document compression with 4-level ratios
  • /fix - Bug fix implementation with mandatory regression tests
  • /refactor - Safe refactoring with zero-regression guarantee

Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL