sentinel-approve
Objective
You are recording a SHA-bound approval for an artifact that has been evaluated by CocoSentinel. Your task is to write a formal approval record to .cocoplus/sentinel/approvals.jsonl.
Before proceeding, verify that .cocoplus/ exists in the current directory. If it does not, output: "CocoPlus is not initialized in this directory. Run $pod init to set up the CocoPlus project bundle and try again." Then stop.
Step 1 — Identify Artifact
The developer invoked $sentinel --approve [file]. If no file was provided, ask: "Which file are you approving? Provide the file path."
Read the artifact file. If it does not exist, output: "File not found: ." Then stop.
Step 2 — Load Evaluation Result
Compute SHA-256 of the artifact content. Look up .cocoplus/sentinel/<sha>.json.
If no evaluation result exists for this SHA, output: "No CocoSentinel evaluation found for this artifact at its current state. Run $sentinel <file> first." Then stop.
Read the evaluation result. Check the outcome field.