autostockstaple-log-analysis

Analyzes MaaEnd AutoStockStapleMain logs to reconstruct purchases and bill timelines.

3.7k|317|Updated Mar 18, 2022
One-click install
npx skills add https://github.com/MaaEnd/MaaEnd --skill autostockstaple-log-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autostockstaple-log-analysis
Source: https://github.com/MaaEnd/MaaEnd/tree/main/.agents/skills/autostockstaple-log-analysis
Command: npx skills add https://github.com/MaaEnd/MaaEnd --skill autostockstaple-log-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When debugging the MaaEnd AutoStockStapleMain task, it is hard to tell from raw maafw and go-service logs what was actually purchased, why a purchase stopped, and how the remaining bill (coupons/bill) changed over time. This Skill provides a rigorous log-analysis workflow that reconstructs the real purchase sequence, separates recognized-but-not-purchased items, and rebuilds a step-by-step remaining-bill timeline.

Core Features & Use Cases

  • Purchase Reconstruction: Correlates AutoStockBuyItem task clicks with AutoStockInStapleItemName OCR boxes and AutoStockStapleQuantityControl Buy/Exclude branches to determine what was truly bought versus merely recognized.
  • Bill Timeline Rebuild: Builds a mandatory timeline of CurrentStockBillText OCR values, with special handling for bill-currency changes when switching between ValleyIV and Wuling scenes.
  • Instrumentation Guidance: Maps log evidence back to real pipeline nodes and recommends where to add logging in pipeline or go-service code.
  • Use Case: A user reports that AutoStockStapleMain bought the wrong items or that the bill dropped unexpectedly; you run this Skill against their log directory to produce a purchase list, event timeline, and bill timeline with evidence.

Quick Start

Analyze the attached MaaEnd log directory for the AutoStockStapleMain task and reconstruct what was actually purchased together with the remaining bill timeline.

Frequently Asked Questions about autostockstaple-log-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find out what AutoStockStapleMain actually purchased?

Search maafw logs for successful AutoStockBuyItemValleyIVTask or AutoStockBuyItemWulingTask clicks, then match each click box to the AutoStockInStapleItemName OCR box. Only count an item as purchased if its AutoStockStapleQuantityControl Buy branch succeeded and reached the confirm-buy path.

Why did AutoStockStapleMain recognize an item but not buy it?

Recognition only means the item entered the quantity-control decision flow. If AutoStockStapleQuantityControl Exclude succeeded instead of Buy, the item was judged as not needed at current stock levels and must be reported as recognized but not purchased.

Why does the remaining bill jump by millions between log entries?

Large jumps near a scene switch usually mean the bill currency changed between ValleyIV and Wuling, not that one purchase consumed the difference. Check whether the task switched between AutoStockInStapleValleyIV and AutoStockInStapleWuling before attributing the change to a purchase.

Can I use this analysis flow for AutoStockpileMain logs?

No. AutoStockpileMain is a separate task driven by go-service gift-pack selection logic, while AutoStockStapleMain is driven by pipeline nodes like AutoStockBuyItemValleyIVTask. Mixing them produces incorrect purchase lists.

What if the task logs are split across rotated maafw.bak files?

Track the file containing the matching task_id rather than relying on filename timestamps. A task may start in one maafw.bak file while later files only contain initialization content, so never conclude no purchase happened without checking all relevant rotated logs.

Where should I add logging to debug AutoStockStaple purchases?

Add candidate-item logging at AutoStockBuyItemValleyIVTask and AutoStockBuyItemWulingTask, stop-reason logging at AutoStockTargetCanNotBuy nodes, and branch logging at AutoStockStapleQuantityControl Buy and Exclude nodes with region, item name, and current bill in the payload.