---
name: ctxfr-help
description: Show the ctxfr command and workflow reference. Use when the user asks for ctxfr help, available ctxfr commands, context fragment workflows, or the equivalent of /ctxfr-help.
---

# ctxfr Help

Display this reference:

```text
=== CONTEXT FRAGMENTS - COMMAND REFERENCE ===

SETUP & MAINTENANCE
  ctxfr-init [path]          Scaffold a new fragment, adopt an existing CLAUDE.md/AGENTS.md, or refresh.
  ctxfr-fix [category]       Run health check and auto-fix issues. Categories: stale, coverage,
                             routing, decisions, agents, metrics. No argument runs all.
  ctxfr-health               Full health report: freshness, coverage, routing, decisions, agents,
                             and composite score.

STALENESS & COVERAGE
  ctxfr-stale                Quick check for specs drifted from covered source files.
  ctxfr-coverage             Coverage analysis for source files with no spec coverage.

ROUTING
  ctxfr-route-check          Audit ctxfr retrieval or simulate route resolution.

CACHE
  ctxfr-cache                Show hash cache status.
  ctxfr-cache validate       Validate cache structure, references, and hash integrity.
  ctxfr-cache rebuild        Force full cache rebuild with current hash tool.
  ctxfr-cache clear          Delete cache hash rows for the current project.

CTXFR BINARY
  ctxfr env [dir]
  ctxfr hash <file>...
  ctxfr hash --batch
  ctxfr hash tree <path>
  ctxfr specs
  ctxfr specs --coverage
  ctxfr specs --json
  ctxfr specs --validate
  ctxfr sources
  ctxfr sources --count
  ctxfr sources --orphans
  ctxfr sources --grouped
  ctxfr cache status
  ctxfr cache validate
  ctxfr cache get <s> <f>
  ctxfr cache set <s> <f> <h>
  ctxfr cache snapshot <spec>
  ctxfr cache rebuild
  ctxfr cache clear
  ctxfr stale
  ctxfr health
  ctxfr health --json
  ctxfr health --enforce-thresholds
  ctxfr route-check
  ctxfr route <task>
  ctxfr context --task <task> --budget <tokens>
  ctxfr find <query>
  ctxfr explain <artifact>
  ctxfr related <path>
  ctxfr decisions --for <path>
  ctxfr db init
  ctxfr db migrate
  ctxfr db status
  ctxfr config thresholds [coverage freshness]
  ctxfr project status [path]
  ctxfr project mode [path] [mode]
  ctxfr capture session <note-file> [summary]
  ctxfr session list
  ctxfr session show <id>
  ctxfr context-history import --vendor <name> --session <id> --summary <file>
  ctxfr context-history resume --from <vendor:session> --to <vendor>
  ctxfr context-history validate <snapshot-id>
  ctxfr adr create --implementation <session-id> <title>
  ctxfr tech-spec create <path> <title> <body-file>
  ctxfr workspace scan <root>
  ctxfr index rebuild <path>
  ctxfr import markdown <path>
  ctxfr export markdown [path]
  ctxfr export markdown --check [path]
  ctxfr init [path]
  ctxfr metrics log <command>
  ctxfr metrics feedback <event-id> <0|1>
  ctxfr metrics summary
  ctxfr metrics summary --artifacts
  ctxfr version

Hash tool: builtin-xxh3.

TYPICAL WORKFLOWS
  First time:     ctxfr-init -> ctxfr-health -> ctxfr-fix
  Routine check:  ctxfr-stale
  Deep review:    ctxfr-health -> ctxfr-fix
  Cache issues:   ctxfr-cache validate -> ctxfr-cache rebuild
```
