Files
Nicholas Ferguson 0348090e39 docs: remove phantom feature references and fix stale documentation
Remove references to non-existent modes/, workflows/, profiles/, scenarios/,
and flags/ directories across 11 documentation files. These described a
planned "three-layer system" that was superseded by the current skills-based
architecture.

Key changes:
- AGENTS.md: update core module tree to match actual codebase
- docs/index.md: fix version (2.0.0 → 3.0.1), remove Mode/Workflow/Flag sections
- docs/guides/hooks.md: replace 7 phantom hooks with 9 actual hooks
- docs/reference/api/index.md: list actual core modules
- docs/reference/architecture/: remove three-layer references, fix paths
- Archive quick-reference.md (entirely phantom content)
- Fix broken modes.html links and stale CLI command references
2026-03-06 15:05:47 -05:00

1.9 KiB

API Reference

Complete API documentation for the cortex Python modules.

Core Modules

Module Description
installer Post-install helpers (completions, manpages, docs)

TUI Modules

Module Description
shell_integration Shell alias installation for bash/zsh/fish
tui_workflow_viz Workflow visualization (timeline, Gantt, dependency trees)

Core Subsystem

Module Description
core/agents Agent graph, dependencies, activation
core/skills Skill discovery, metrics, community integration
core/rules Rule management
core/hooks Hook installation and validation
core/mcp MCP server discovery and configuration
core/worktrees Git worktree management
core/backup Configuration backup/restore
core/asset_installer Asset installation (symlinks)
core/asset_discovery Asset discovery across scopes

Common Patterns

Return Convention

Most functions return Tuple[int, str]:

  • int: Exit code (0 = success, non-zero = error)
  • str: Human-readable message
code, msg = some_function()
if code == 0:
    print(f"Success: {msg}")
else:
    print(f"Error: {msg}")

Home Directory Override

Functions accept home: Path | None for testing:

# Use default (~)
result = discover_prompts()

# Override for testing
result = discover_prompts(home=Path("/tmp/test-home"))

Dry Run Support

Installer functions support dry_run=True:

# Preview without making changes
code, msg = install_completions(dry_run=True)
print(msg)  # "Would install bash completions to: ~/.bash_completion.d/..."