/harvest -- Sprint analytics and retrospective
The user wants quantitative analysis of the current sprint: claim type distributions, evidence quality, stale claims, and velocity metrics.
Arguments
$ARGUMENTS
Optional: --full to generate an HTML retrospective report. --calibrate to run prediction scoring.
Instructions
-
Detect the sprint directory:
- Run
wheat_statusto get the current sprint metadata. - Identify the sprint directory from the status output (the directory containing
claims.json). - If no active sprint is found, check the current working directory for a
claims.jsonfile. - If still not found, stop and tell the user: "No active sprint detected. Run
/initto start one." - Store the resolved directory as
<dir>for subsequent steps.
- Run
-
Run type/evidence analysis:
- Execute:
npx @grainulation/harvest analyze <dir> - This returns claim type distribution (constraint, factual, estimate, risk, recommendation, feedback) and evidence tier distribution (stated, web, documented, tested, production).
- Capture the output for the summary.
- Execute:
-
Run stale claim detection:
- Execute:
npx @grainulation/harvest decay <dir> --days 7 - This flags claims that haven't been updated, corroborated, or challenged in 7+ days.
- Capture the list of stale claim IDs and their ages.
- Execute:
-
Display the analytics summary:
Harvest: <sprint-slug> ───────────────────────────── Claim distribution: constraint: <n> | factual: <n> | estimate: <n> risk: <n> | recommendation: <n> | feedback: <n> Evidence quality: stated: <n> | web: <n> | documented: <n> | tested: <n> | production: <n> Weak areas: - <list any evidence tiers with 0 claims, or types with heavy concentration> - <flag if >60% of claims share the same type (type monoculture)> - <flag if >50% of evidence is "stated" or "web" (weak evidence base)> Stale claims (<n> total): - <id>: "<summary>" — <age> days stale - ... Velocity: <output from analyze, e.g. claims/day, time between phases> -
Suggest full retrospective:
- Tell the user they can generate a full HTML retrospective report:
For a full retrospective report: npx @grainulation/harvest report <dir> -o output/harvest.html - If the user passed
--full, run the report command directly and write the output tooutput/harvest.html.
- Tell the user they can generate a full HTML retrospective report:
-
Recommend calibration if sprint is complete:
- If the sprint appears to be in a late phase (has recommendations, has a brief, or the user mentioned shipping), suggest:
Sprint looks complete. Score your predictions: /calibrate --outcome "what actually happened" npx @grainulation/harvest calibrate <dir> - If the user passed
--calibrate, runnpx @grainulation/harvest calibrate <dir>and display the prediction accuracy results.
- If the sprint appears to be in a late phase (has recommendations, has a brief, or the user mentioned shipping), suggest:
-
Suggest next steps based on the findings:
Next steps: /challenge <stale-id> -- revisit the stalest claim /witness <weak-id> <url> -- strengthen weak evidence /blind-spot -- check for structural gaps /brief -- compile findings into a decision docTailor the suggestions:
- Stale claims exist -> suggest
/challengeor/researchon the stalest - Weak evidence base -> suggest
/witnessor/research - Type monoculture -> suggest
/challengeto diversify - Sprint looks healthy -> suggest
/briefor/present
- Stale claims exist -> suggest