Skip to main content

/component-activate - Full Component Lifecycle Management

Complete component lifecycle: inventory → register → activate → classify → improve → index → commit.

Usage

# Full lifecycle for a single component
/component-activate path/to/component.md

# Full lifecycle for a directory
/component-activate agents/

# Specific stages only
/component-activate path/ --inventory # List components
/component-activate path/ --register # Add to index
/component-activate path/ --classify # MoE classification
/component-activate path/ --improve # Quality enhancement
/component-activate path/ --commit "message" # Git commit

# Skip stages
/component-activate path/ --no-classify # Skip classification
/component-activate path/ --no-commit # Don't auto-commit

# Dry run
/component-activate path/ --dry-run

System Prompt

EXECUTION DIRECTIVE: When the user invokes /component-activate, execute the following 7-stage workflow:

Stage 1: Inventory

# Count and list components at path
python3 ~/.coditect/scripts/component-indexer.py --stats
python3 ~/.coditect/scripts/component-indexer.py --type agent --list
python3 ~/.coditect/scripts/component-indexer.py --type skill --list
python3 ~/.coditect/scripts/component-indexer.py --type command --list

Output: Component counts by type, list of unregistered components

Stage 2: Register

# Index components into SQLite database
python3 ~/.coditect/scripts/component-indexer.py -i # Incremental
# OR
python3 ~/.coditect/scripts/component-indexer.py # Full rebuild

Output: Components registered in framework registry

Stage 3: Activate

Activation means the component is ready for use:

  • Has valid frontmatter (title, version, status: active)
  • Is indexed in the component database
  • Has been classified by MoE
# Check activation status
python3 ~/.coditect/scripts/component-indexer.py --search "component-name" --verbose

Activation Checklist:

  • Frontmatter complete (title, version, type, status)
  • File in correct directory (agents/, skills/, commands/)
  • Indexed in component database
  • MoE classified (moe_confidence, moe_classified fields)

Stage 4: Classify (MoE)

# Run MoE classification on component(s)
/classify path/to/component.md

# Or batch classify directory
/classify agents/

Auto-adds fields:

  • type - Component type
  • component_type - Specific type
  • keywords - Auto-extracted keywords
  • tags - Classification tags
  • moe_confidence - Classification confidence (0.0-1.0)
  • moe_classified - Date of classification

Stage 5: Improve (Optional)

# Run quality improvement analysis
python3 ~/.coditect/scripts/skill-pattern-analyzer.py --component path/to/component.md

# Or use the improve skill
/agent component-enhancer "Improve component: path/to/component.md"

Improvements:

  • Add missing frontmatter fields
  • Enhance description/summary
  • Add usage examples
  • Fix formatting issues
  • Add cross-references

Stage 6: Index to Database

# Run component indexer to add to searchable SQLite database
python3 ~/.coditect/scripts/component-indexer.py -i # Incremental update

# Verify component is indexed
python3 ~/.coditect/scripts/component-indexer.py --search "<component-name>"

# Show updated stats
python3 ~/.coditect/scripts/component-indexer.py --stats

Output: Component added to ~/PROJECTS/.coditect-data/context-storage/platform.db (ADR-118 Tier 1) with FTS5 search

Indexed Fields:

  • id - Type-prefixed unique ID (agent/my-agent, skill/my-skill)
  • type - Component type (agent, skill, command, script, hook)
  • name - Component name
  • path - File path
  • description - Auto-extracted description
  • model - LLM binding from frontmatter (if present)
  • tags - Classification tags
  • status - Activation status

Verification:

# Search for newly indexed component
python3 ~/.coditect/scripts/component-indexer.py --search "my-new-agent"

# Filter by type
python3 ~/.coditect/scripts/component-indexer.py --type agent --search "my-new-agent"

# Check database directly (ADR-118: platform.db for component data)
sqlite3 ~/PROJECTS/.coditect-data/context-storage/platform.db "SELECT id, name, type FROM component_index WHERE name LIKE '%my-new-agent%'"

Stage 7: Git Commit

# Stage changes
git add path/to/component.md

# Commit with descriptive message
git commit -m "feat(component): Activate <component-name>

- Registered in component index
- MoE classified (confidence: 0.95)
- Quality improved
- Indexed in SQLite database

Co-Authored-By: Claude <noreply@anthropic.com>"

# Push (optional, with --push flag)
git push origin HEAD

Full Workflow Example

# Activate a new agent
/component-activate agents/my-new-agent.md

# Output:
# Stage 1: Inventory
# Found 1 component at agents/my-new-agent.md
# Type: agent
# Status: draft → active
#
# Stage 2: Register
# Added to framework registry: agent/my-new-agent
# Total components: 153 agents
#
# Stage 3: Activate
# Frontmatter: ✅ Complete
# Directory: ✅ agents/
# Registered: ✅ Yes
#
# Stage 4: Classify
# Running MoE classification...
# Confidence: 0.95
# Tags: [agent, automation, development]
#
# Stage 5: Improve
# Added: usage examples, cross-references
# Quality score: 85 → 92
#
# Stage 6: Index to Database
# Running component-indexer.py -i...
# Indexed: agent/my-new-agent
# Database: ~/PROJECTS/.coditect-data/context-storage/platform.db (ADR-118 Tier 1)
# Searchable: ✅ Yes (FTS5)
#
# Stage 7: Commit
# Committed: feat(agent): Activate my-new-agent
# Ready to push with: git push

Batch Activation

# Activate all new agents
/component-activate agents/ --new-only

# Activate all components needing classification
/component-activate . --unclassified

# Activate and push
/component-activate skills/new-skill/ --commit "Add new skill" --push

Options

OptionDescription
--inventoryOnly run inventory stage
--registerOnly run register stage
--classifyOnly run classify stage
--improveOnly run improve stage
--indexOnly run index to database stage
--commit "msg"Commit with message
--pushAlso push after commit
--no-classifySkip MoE classification
--no-indexSkip database indexing
--no-commitDon't auto-commit
--new-onlyOnly process new/unindexed
--unclassifiedOnly process unclassified
--dry-runPreview without changes
-v, --verboseDetailed output

Component Types

TypeDirectoryExample
agentagents/agents/my-agent.md
skillskills/*/skills/my-skill/SKILL.md
commandcommands/commands/my-command.md
scriptscripts/scripts/my-script.py
hookhooks/hooks/my-hook.py
workflowworkflows/workflows/category/my-workflow.json
standardcoditect-core-standards/coditect-core-standards/MY-STANDARD.md

Required Frontmatter

---
title: Component Name
component_type: agent|skill|command|script|hook|workflow|standard
version: 1.0.0
status: active
summary: Brief description
keywords:
- keyword1
- keyword2
tags:
- tag1
created: '2026-01-09'
updated: '2026-01-09'
moe_confidence: 0.950
moe_classified: 2026-01-09
---

Troubleshooting

IssueSolution
"Component not found"Check path is relative to ~/.coditect/
"Missing frontmatter"Add required YAML frontmatter block
"Classification failed"Check MoE classifier is configured
"Indexing failed"Run python3 ~/.coditect/scripts/component-indexer.py --stats to check DB
"Not searchable"Run python3 ~/.coditect/scripts/component-indexer.py -i to rebuild index
"Commit failed"Ensure git repo is clean, check permissions

Script: ~/.coditect/scripts/component-activate.sh Indexer: ~/.coditect/scripts/component-indexer.py Database (ADR-118): ~/PROJECTS/.coditect-data/context-storage/platform.db (Tier 1 - component data) Last Updated: January 26, 2026