| name | cash-analyze |
| description | Analyze artifact consistency for a change |
| license | MIT |
| metadata | {"author":"cash","version":"1.0"} |
Project-local Cash CLI bootstrap
執行任何 Cash artifact command 前,MUST 先從目前目錄解析並驗證 Git root,再使用該 root 下的 absolute launcher;不得依賴 PATH 或外部 runtime:
cash_root="$(git rev-parse --show-toplevel)" || exit 1
cash_cli="$cash_root/.cash-skills/bin/cash"
test -x "$cash_cli" || exit 1
同一段 workflow 後續每個 artifact command MUST 使用 "$cash_cli"。
Analyze artifact consistency for a change. Can be invoked directly or triggered automatically when all artifacts are complete.
Input: Optionally specify a change name (e.g., $cash-analyze add-auth). If omitted, infer from conversation context or auto-select if only one active change exists.
Prerequisites: This skill requires the Cash CLI. If any Cash command fails with "command not found" or similar, report the error and STOP.
Response language: All user-facing responses in this workflow MUST be written in Traditional Chinese unless the user explicitly requests another language. Keep shell commands, file paths, code identifiers, schema field names, and quoted source text verbatim.
Steps
-
Determine change name
If not provided, infer from context or run "$cash_cli" list --json to auto-select.
-
Run programmatic analysis
"$cash_cli" analyze <change-name> --json
This returns structured JSON with:
dimensions: Array of { dimension, status, finding_count } for Coverage, Consistency, Ambiguity, Gaps
findings: Array of { id, dimension, severity, location, summary, recommendation }
artifacts_analyzed / artifacts_missing: Which artifacts were available
-
Present results
Format the JSON output as a readable summary:
## Artifact Analysis: <change-name>
| Dimension | Status |
|---------------|--------------------------|
| Coverage | <status> |
| Consistency | <status> |
| Ambiguity | <status> |
| Gaps | <status> |
Group findings by severity (Critical > Warning > Suggestion) with locations and recommendations.
-
Supplement with AI semantic analysis (optional)
The programmatic analyzer catches structural issues. For deeper semantic analysis, also read the artifacts and check for:
- Design decisions that contradict spec requirements
- Tasks referencing work outside proposal scope
- Risks in design without corresponding spec coverage
- Logical inconsistencies between artifacts
Add any additional findings to the report.
-
Recommend next steps
- If CRITICAL findings: "Found N issue(s) worth addressing. Want to fix these before implementing?"
- If only warnings/suggestions: Note them briefly, then recommend proceeding with
$cash-apply
- If clean: "Artifacts look consistent" and suggest
$cash-apply
Passive Trigger
When "$cash_cli" status --change "<name>" --json shows isComplete: true, run this analysis automatically before recommending $cash-apply.
Guardrails
- Read-only: NEVER modify files
- Keep output concise - this runs inline, not as a separate workflow
- If AskUserQuestion tool is not available, ask the same questions as plain text and wait for the user's response