Your objective is to display a CocoContext organizational standards file.
Pre-flight Check
Check that .cocoplus/ exists. If not:
Output: "CocoPlus not initialized in this directory. Run $pod init to begin." Then stop.
Resolve Target File
If a file name argument was provided (e.g., $context view approved-models or $context view approved-models.md):
- Normalize: strip
.mdsuffix if present, then append.md - Read
.cocoplus/context/<file-name>.md - If not found: output error listing available files (same as
$context listoutput), then stop
If no argument was provided:
- Run
$context listoutput first (show the status table) - Prompt: "Which context file would you like to view? Enter the name (e.g., approved-models):"
- Wait for response, then read the selected file
Display File
Read the file and display its full content. After the content, output:
──────────────────────────────────────
File: .cocoplus/context/<category>.md
Lines: <N> | Last modified: <date>
Run `$context add` to update this file.
Anti-Rationalization
| Shortcut / Temptation | Why It Fails |
|---|---|
| Skip showing line count and date | These are key metadata for context governance — developers need to know how stale a file is |
Exit Criteria
- File content displayed in full
- Line count and last-modified date shown
- If file not found, available files listed with actionable next step