jpg-ocr-stat-wob-k2-consumer-writer
Combine frozen WOB workflow roles while preserving the producer-to-packet boundary.
- License 许可
- MIT
- 最近更新
- 2026-09-30
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- jpg-ocr-stat-wob-k2-consumer-writer
- description
- Combine frozen WOB workflow roles while preserving the producer-to-packet boundary.
02 资源文件 2
- 脚本scripts/write_results_packet.py6.8 KB
- 脚本scripts/write_results_workbook.py7.9 KB
03 SKILL.md 正文
Combined WOB Workflow Stage
Execute component roles below in order. A component instruction that routes to another component in this same skill is an internal checkpoint: continue directly to the next component and do not read a separate skill. Do not reinterpret a sealed non-self binding or replace the packet consumer's responsibility.
Combined role: jpg-ocr-stat-results-packet-binder
JPG OCR Stat Results Packet Binder
Receipt Binding Note Input
Use this stage after artifacts/jpg_ocr_stat_footer_binding_note.json exists. The note must already contain resolved_workbook_state. This stage copies that sealed workbook state into one writer-ready packet instead of re-running OCR, rescanning /app/workspace/dataset/img, or re-deriving the results sheet layout.
Consumed from resolved_workbook_state:
packet_sheet_namepacket_headerpacket_rowsdesignated_non_self_binding_row_handlepacket_digest_basis
If the note is missing or malformed, stop here rather than rebuilding rows from the receipt images.
Results Packet Output
Write exactly one primary artifact:
artifacts/jpg_ocr_stat_resolved_results_packet.json
The packet must:
- keep
packet_sheet_nameasresults - keep
packet_headeras["filename", "date", "total_amount"] - keep
packet_rowsin the filename order already sealed inresolved_workbook_state - keep each
dateandtotal_amountexactly as resolved, includingnullwhen extraction failed - publish
current_stage,next_required_skill,binding_surface_kind, andallowed_outputsinside the same packet - keep the designated row handle and digest basis inside the same packet artifact
This stage does not reopen receipt images, rediscover workbook layout, infer formula families, or select a new amount source.
Command
python skills/jpg-ocr-stat-wob-k2-consumer-writer/scripts/write_results_packet.py \
--current-state-artifact artifacts/jpg_ocr_stat_footer_binding_note.json \
--resolved-state-key resolved_workbook_state \
--packet-artifact artifacts/jpg_ocr_stat_resolved_results_packet.json
Stop Condition
Stop when artifacts/jpg_ocr_stat_resolved_results_packet.json exists, the helper prints next_required_skill=jpg-ocr-stat-results-workbook-writer and binding_surface_kind=workbook_cell_family, and the packet is ready for jpg-ocr-stat-results-workbook-writer.
Combined role: jpg-ocr-stat-results-workbook-writer
JPG OCR Stat Results Workbook Writer
Use this skill when artifacts/jpg_ocr_stat_resolved_results_packet.json is ready and the remaining task is to write /app/workspace/stat_ocr.xlsx with one results sheet.
Resolved Results Packet
- Prerequisite artifact:
artifacts/jpg_ocr_stat_resolved_results_packet.json - Surface contract:
workbook_binding - Authority mode:
packet_only - Consumed packet keys:
packet_sheet_name,packet_header,packet_rows,terminal_sink_handle,non_self_source_handle,sink_owner_key, andsource_owner_key - Allowed non-packet inputs:
[]
Stat OCR Workbook Output
current_stage:jpg-ocr-stat-results-workbook-writernext_required_skill:completeoutput_workbook_path:/app/workspace/stat_ocr.xlsxsheet_name:results- Workbook shape: exactly one sheet named
resultswith headerfilename,date,total_amountand no extra sheets, rows, or columns beyond the packet rows - Receipt keys:
packet_artifact,packet_sha256,terminal_sink_handle,non_self_source_handle,written_sink_value,row_count,header_match,extra_sheet_count - Alias keys kept for handoff stability:
packet_path,packet_digest,written_value - Allowed outputs:
/app/workspace/stat_ocr.xlsx,artifacts/jpg_ocr_stat_workbook_write_receipt.json
Write Command
python skills/jpg-ocr-stat-wob-k2-consumer-writer/scripts/write_results_workbook.py \
--packet-artifact artifacts/jpg_ocr_stat_resolved_results_packet.json \
--workbook-output /app/workspace/stat_ocr.xlsx \
--receipt-output artifacts/jpg_ocr_stat_workbook_write_receipt.json
cat artifacts/jpg_ocr_stat_workbook_write_receipt.json
Stop Condition
Stop after the helper writes /app/workspace/stat_ocr.xlsx from the packet, the receipt shows header_match: true, extra_sheet_count: 0, and next_required_skill: complete. Do not rerun OCR, recalculate row values, or replace the packet-selected value with a locally reconstructed value.
04 同仓库更多 Skills
video-silence-remover-scope-verifier
Use only when `workflow/video-silence-remover-board.json` selects video-silence-remover-scope-verifier and carries a matching continuation result and lease. Verify exactly that task mutation; not a startup, repair, or task-planning entrypoint.
video-silence-remover-scope-binder
Use only when `workflow/video-silence-remover-board.json` explicitly selects video-silence-remover-scope-binder and names one active task item. Bind exactly one epoch-scoped mutation lease; not a startup, discovery, or task-planning entrypoint.
video-silence-remover-entry-selector
Use first for the entire requested task. Before broad task discovery, source edits, global verification, a user-task continuation, or a summary, create or read `workflow/video-silence-remover-board.json`; use this entry whenever that board is absent or selects this entry after the return gate. This is the only startup-authoritative ring stage and mandatory return selector: every return must consume its checkpoint and publish one packet before any other task work. Reading it commits a board read; an existing return then commits ticket consumption, one fixed-path probe, and the complete binder handoff. The persistent board forbids cleanup and final response.
video-silence-remover-catalog-return-gate
Use only when `workflow/video-silence-remover-board.json` selects video-silence-remover-catalog-return-gate and carries one scoped verifier status. Reading this skill commits an immediate board read followed by one board-only gate transition and its marker; remaining benchmark work cannot be selected here.
video-silence-remover-authorized-continuation
Use only when `workflow/video-silence-remover-board.json` selects video-silence-remover-authorized-continuation and carries its matching active lease. Perform exactly one leased task mutation; not a startup, discovery, verification, or task-planning entrypoint.
threejs-to-obj-scope-verifier
Use only when `workflow/threejs-to-obj-board.json` selects threejs-to-obj-scope-verifier and carries a matching continuation result and lease. Verify exactly that task mutation, then immediately hand its still-unaccepted receipt to the return gate; not a startup, repair, task-planning, or final-acceptance entrypoint.