Skip to main content

/version - Component Version Observability

Query version information for any CODITECT component (agent, skill, command, hook, script). Shows version, last update date, and last review date — essential for troubleshooting and support.

Usage

/version <component>           # Version info for a specific component
/version --stale [days] # Components not reviewed in N days (default: 90)
/version --outdated # Components changed but not re-verified
/version --summary # Quick version stats across all components

System Prompt

EXECUTION DIRECTIVE: When /version is invoked, you MUST:

  1. IMMEDIATELY execute the database query — no questions first
  2. Query platform.db for version, content_updated, and last_reviewed
  3. Format output in a clear table for troubleshooting
  4. For binaries, also show the binary version via CLI flag (e.g., codi-watcher --version)

Execution Steps

# Step 1: Locate platform.db
DB_PATH="$HOME/PROJECTS/.coditect-data/context-storage/platform.db"
CODITECT_CORE="$HOME/PROJECTS/coditect-rollout-master/submodules/core/coditect-core"

# Step 2: Query component version info
python3 "$CODITECT_CORE/scripts/component-indexer.py" --db "$DB_PATH" --version-query "<component>"

# Step 3: For --stale
python3 "$CODITECT_CORE/scripts/component-indexer.py" --db "$DB_PATH" --stale <days>

# Step 4: For --outdated
python3 "$CODITECT_CORE/scripts/component-indexer.py" --db "$DB_PATH" --outdated

Alternate: Direct SQL Query

import sqlite3

def version_query(component_name: str, db_path: str):
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute("""
SELECT id, type, name, version, content_updated, last_reviewed, status, path
FROM components
WHERE name LIKE ? OR id LIKE ?
ORDER BY type, name
""", (f"%{component_name}%", f"%{component_name}%"))
return cursor.fetchall()

Response Format

Single Component Query

/version codi-watcher

┌─────────────────────────────────────────────────────┐
│ Component: codi-watcher │
├─────────────────────────────────────────────────────┤
│ Type: binary (Rust) │
│ Version: 2.0.0 │
│ Updated: 2026-02-05 │
│ Last Reviewed: 2026-02-12 │
│ Status: operational │
│ Path: tools/context-watcher/ │
│ Binary: ~/.coditect/bin/codi-watcher │
│ Binary --version: codi-watcher 2.0.0 │
└─────────────────────────────────────────────────────┘

Stale Components

/version --stale 90

Components not reviewed in 90 days (cutoff: 2025-11-14):
──────────────────────────────────────────────────────────
[agent ] code-reviewer v1.0.0 reviewed: NEVER
[skill ] debugging-patterns v1.0.0 reviewed: 2025-10-01
[command ] search v1.0.0 reviewed: NEVER

Total: 3 stale (2 never reviewed, 1 reviewed before 2025-11-14)

Outdated Components

/version --outdated

Components changed but not re-verified:
──────────────────────────────────────────────────────────
[agent ] senior-architect updated: 2026-02-10 reviewed: 2026-01-15
[skill ] cloud-native-patterns updated: 2026-02-08 reviewed: 2026-01-20

Total: 2 components need review

Frontmatter Fields

The /version command reads these YAML frontmatter fields:

FieldPurposeExample
version:Semantic version2.1.0
updated:Date of last substantive change'2026-02-05'
last_reviewed:Date someone verified correctness'2026-02-12'

All three fields are stored in platform.db during component indexing:

DB ColumnFrontmatter SourceDescription
versionversion:Component version
content_updatedupdated:When content was last changed
last_reviewedlast_reviewed:When content was last verified

Binary Version Support

For compiled binaries (codi-watcher), version is also available via CLI:

# Binary version
~/.coditect/bin/codi-watcher --version
# Output: codi-watcher 2.0.0

# Detailed version (if available)
~/.coditect/bin/codi-watcher --version --verbose

CommandPurpose
/whatDiscover components by type or capability
/whichFind best agent for a task
/how use <component>Usage guide for a component
  • Script: scripts/component-indexer.py (--version-query, --stale, --outdated)
  • Database: platform.db (components table: version, content_updated, last_reviewed)
  • TRACK: H.24 (Component Version Observability)

Success Output

COMMAND COMPLETE: /version
Component: <name>
Version: <version> | Updated: <date> | Reviewed: <date>

Completion Checklist

  • Database queried for component version info
  • Version, updated, and last_reviewed displayed
  • Binary version checked (if applicable)

Failure Indicators

  • Component not found in platform.db
  • Database not indexed (run component-indexer.py first)
  • Binary not installed (for --version on binaries)

Command Version: 1.0.0 Created: 2026-02-12 Updated: 2026-02-12 Author: CODITECT Core Team TRACK: H.24 (Component Version Observability)