一键导入
cash-ingest
Update an existing Cash change from external context
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update an existing Cash change from external context
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze artifact consistency for a change
Implement Cash tasks with a sub-agent quality gate after completion
Archive a completed change
Query openspec/documents and answer questions
Audit changed code for security sharp edges — dangerous defaults, type confusion, and silent failures
Commit files related to a specific Cash change
| name | cash-ingest |
| description | Update an existing Cash change from external context |
| license | MIT |
| metadata | {"author":"cash","version":"1.0"} |
執行任何 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"。
Update an existing Cash change — from a plan file or conversation context.
Plan file support is available when the tool has a plan directory (~/.claude/plans/). Otherwise, use conversation context to update artifacts.
Prerequisites: The project-local launcher initialized above is required. If root resolution, launcher validation, or a Cash command fails, report the exact error and STOP.
Input: Optionally specify a plan file path or name.
/cash-ingest ~/.claude/plans/agile-discovering-rocket.md/cash-ingest agile-discovering-rocket/cash-ingest (use conversation context or auto-detect plan file)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
Locate the requirement source
a. Argument provided → treat as plan file reference (prepend ~/.claude/plans/ and append .md if needed)
b. No argument, plan file detectable:
~/.claude/plans/<name>.md)c. No argument, no plan file detectable:
~/.claude/plans/ for recent filesd. Conversation context fallback (no plan files found at all):
Parse the plan structure (skip if using conversation context)
Claude Code plan files typically contain:
# ...) — the high-level goalExtract:
plan_title: from the H1 headingplan_context: from the Context sectionplan_stages: each numbered stage with its goal and file listplan_files: all file paths mentionedplan_verification: verification stepsIf the plan content is too brief to fill the required artifact sections, use the AskUserQuestion tool to get the missing details rather than inventing content.
Check for active changes (REQUIRED — ingest only updates existing changes)
"$cash_cli" list --json
Also check for parked changes:
"$cash_cli" list --parked --json
Parse both JSON outputs to get the full list of changes (active + parked). Parked changes should be annotated with "(parked)" in any selection list.
/cash-propose first to create one." and stopSelect the change
After selecting the change, check if it is parked:
"$cash_cli" list --parked --json
If the selected change appears in the parked array:
"$cash_cli" unpark "<name>" then proceedRead existing artifacts for context before updating.
Update artifacts
For each artifact, get instructions first:
"$cash_cli" instructions <artifact-id> --change "<name>" --json
Use the template from instructions as the output structure. Apply context and rules as constraints but do NOT copy them into the file.
The instructions JSON includes locale — the language to write artifacts in. If present, you MUST write the artifact content in that language. For spec files (specs/*/*.md), the spec-file language policy takes precedence over locale: Traditional Chinese prose with English structural keywords (### Requirement:, #### Scenario:, GIVEN/WHEN/THEN/AND) and English normative verbs (SHALL / MUST and their NOT forms); every MODIFIED/REMOVED requirement title and every RENAMED FROM title MUST be copied byte-for-byte from the current master spec, because "$cash_cli" archive matches titles verbatim and fails closed with requirement_identity_mismatch when a title does not match.
Plan-to-Artifact Mapping (when using a plan file):
| Plan Section | Artifact | How to Map |
|---|---|---|
| Title | Change name | Convert to kebab-case |
| Context | proposal: Why | Direct content transfer |
| Stages overview | proposal: What | Summarize all stages |
| Individual stages | tasks.md groups | One stage = one ## heading, sub-items = - [ ] |
| File paths | proposal: Impact | Affected code list |
| Verification steps | tasks.md | Final verification task group |
Context-to-Artifact Mapping (when using conversation context):
| Conversation Element | Artifact | How to Map |
|---|---|---|
| Goal / requirement | proposal: Why | Extract motivation from discussion |
| Discussed approach | proposal: What | Summarize agreed approach |
| Mentioned files | proposal: Impact | Affected code list |
| Discussion phases | tasks.md groups | One topic = one ## heading |
When updating an existing change:
[x] items[P] markers on tasks that still qualifyParallel task markers ([P]): When creating or updating the tasks artifact, first read .cash.yaml. If parallel_tasks: true is set, add [P] markers to new tasks that can be executed in parallel. Format: - [ ] [P] Task description. A task qualifies for [P] if it targets different files from other pending tasks AND has no dependency on incomplete tasks in the same group. When parallel_tasks is not enabled, do NOT add [P] markers — but still preserve any existing [P] markers already in the file.
After creating each artifact, re-check status:
"$cash_cli" status --change "<name>" --json
Continue until all applyRequires artifacts are complete. Show progress: "✓ Created "
Inline Self-Review (before CLI analysis)
After updating all artifacts, scan them manually. Fix issues inline, then proceed to the CLI analyzer.
Check 1: No Placeholders
These patterns are artifact failures — fix each one before proceeding:
Check 2: Internal Consistency
Check 3: Scope Check
Check 4: Ambiguity Check
Check 5: Preservation Check (ingest-specific)
[x] still present and unchanged?[P] markers preserved on tasks that still qualify?Check 6: Durable Handoff Review (run BEFORE the CLI analyzer)
The updated change has to survive being parked or handed to another agent. Reject and fix any of the following on incomplete design and task content (do not rewrite completed [x] tasks):
Fix every failure inline using the existing context and the new plan/conversation source before running the CLI analyzer. Update incomplete design and task content so behavior contracts, verification criteria, and scope boundaries stay current with the new context. Preserve completed tasks unchanged.
Analyze-Fix Loop (max 2 iterations)
"$cash_cli" analyze <name> --json
"$cash_cli" analyze <name> --json
d. Repeat up to 2 total iterationsValidation
"$cash_cli" validate "<name>"
If validation fails, fix errors and re-validate.
Summary and next steps
Show:
<path>) or conversation contextUse AskUserQuestion tool to confirm the workflow is complete. This ensures the workflow stops even when auto-accept is enabled. Provide exactly these options:
/cash-apply <change-name> when ready./cash-apply <change-name> to start implementation.If AskUserQuestion tool is not available, display the summary and inform the user to run /cash-apply <change-name> when ready. Then STOP — do not continue.
After the user responds, if they chose "Done", the workflow is OVER. If they chose "Apply", invoke /cash-apply <change-name> to begin implementation.
Guardrails
~/.claude/plans//cash-propose