Skip to main content

Module planetary

Module planetary 

Source
Expand description

“Planetary mode”: renames a project’s well-known files into sci-fi systems and reports each one’s health as mission control would.

Every recognized stack has a fixed vocabulary that maps real files to flavour names:

StackFileSystem
Nodepackage.json⚙️ Main Engine Core
Node.env🛡️ Shield Generator
Nodenode_modules/🔧 System Components Bay
Nodesrc/💾 Data Core
Node.gitignore🚫 Lockdown Protocol
Nodepackage-lock.json📋 Manifest Registry
Pythonrequirements.txt⚙️ Dependencies Matrix
Pythonvenv/🔧 Isolation Pod
Python.env🛡️ Credentials Vault
Pythonsetup.py📋 Build Sequence
Pythonmain.py💾 Mission Core
RustCargo.toml⚙️ Build Configuration
Rustsrc/💾 Source Matrix
RustCargo.lock📋 Build Seal
Rusttarget/🔧 Artifact Chamber

A diagnostic is attributed to a system when its check name or message mentions the corresponding file, and every system’s status uses the theatrical vocabulary OPERATIONAL / MINOR ALERT / OFFLINE.

use limitless_cli::models::{CheckStatus, DiagnosticResult};
use limitless_cli::modules::planetary::render_planetary_diagnostics_plain;

let results = vec![
    DiagnosticResult::new("Dependencies", CheckStatus::Fail, "node_modules/ is missing")
        .with_remediation("Run npm install"),
    DiagnosticResult::new("Env Audit", CheckStatus::Pass, ".env present"),
];
let report = render_planetary_diagnostics_plain(&results);
assert!(report.contains("PLANETARY MODE"));
assert!(report.contains("Mission Health:"));
assert!(!report.contains('\x1b'));

Constants§

PLANETARY_WIDTH
Overall width of the planetary report box, measured in characters.

Functions§

get_planetary_mapping
Builds the file → sci-fi system dictionary for a project stack.
planetary_scan
Deep-scan entry point: builds a fresh snapshot and prints the report.
render_planetary_diagnostics
Renders the planetary mission-control report for diagnostics.
render_planetary_diagnostics_plain
ANSI-free twin of render_planetary_diagnostics, handy for logs/tests.
status_icon
The console marker for a CheckStatus: ✓, ⚠ or ✖.
theatrical_status
The theatrical status label shown for a CheckStatus: OPERATIONAL (pass), MINOR ALERT (warn) or OFFLINE (fail).