documentation/issue-pipeline.md
This repo has a 3-step issue pipeline designed to minimize duplicated work:
The skills are meant to be run in order (often by different people / at different times). Data is handed off via JSON files stored on the docs-data-cache branch.
| Step | Skill | Output | Primary job |
|---|---|---|---|
| 1 | issue-triage | ai-triage/{n}.json | Classification, code investigation, workaround search, suggested action |
| 2 | issue-repro | ai-repro/{n}.json | Standalone repro + version results (reporter → latest → main) |
| 3 | issue-fix | ai-fix/{n}.json + PR | Root cause, fix, regression test; consumes triage/repro artifacts |
All three skills should prefer the local cache worktree when available:
[ -d ".data-cache" ] || git worktree add .data-cache docs-data-cache
git -C .data-cache pull --rebase origin docs-data-cache
CACHE=".data-cache/repos/mono-SkiaSharp"
Expected artifact locations:
"$CACHE/ai-triage/{n}.json""$CACHE/ai-repro/{n}.json""$CACHE/ai-fix/{n}.json"Owns (exclusive):
type, area, platform labels, severity, actionabilityanalysis.codeInvestigation with file:line citationsDoes not own:
Owns (exclusive):
main (source) when feasiblereferences/platform-*.md) based on issue signals and triage datareproductionSteps[].filesCreated[].content (Program.cs, .csproj, etc.)Does not own:
Owns (exclusive):
Does not own:
ai-triage exists (only update if evidence contradicts)ai-repro exists (reuse it)Repro consumes triage for platform selection and hints:
classification.platforms[] → informs platform file selection (e.g., ["os/Linux"] → Docker)classification.* (type/area/backends)evidence.reproEvidence.* (steps/snippets/attachments)evidence.bugSignals.* (severity, errorType, errorMessage, stackTrace)analysis.codeInvestigation[] (entry points / suspected code paths)analysis.workarounds[] (workarounds to validate)analysis.nextQuestions[] (what's still unknown)output.actionability.* + output.missingInfoFix should treat repro JSON as the baseline execution record:
conclusion + notesversionResults[] (especially whether main (source) reproduces)reproProject (packages + tfm)reproductionSteps[] including source file content in filesCreated[].contentenvironment (os/arch/dotnetVersion/skiaSharpVersion/dockerUsed)artifacts[] (binary inputs and where to get them)feedback.corrections[] (where repro corrected triage)ai-repro source files.request-info or close-*: do not run repro/fix unless a human overrides.not-reproduced / inconclusive: issue-fix generally should not start; instead update triage actions (request more info / close / document).reproduced: proceed to issue-fix.confirmed with assessment: "feature-request": proceed to add-api skill (not issue-fix).confirmed with assessment: "docs-gap": proceed to api-docs skill.not-confirmed: close or request more info (feature already exists or docs are correct).When ai-triage/ai-repro exist, the issue-fix PR should copy in:
versionResults[]reproductionSteps[].command) and any required artifactsEach step records corrections to upstream findings in its OWN JSON — never edit upstream files directly.
| Step | Field | Corrects |
|---|---|---|
| Repro | feedback.corrections[] | Triage findings that reproduction contradicts |
| Fix | feedback.corrections[] | Both triage and repro findings that the fix contradicts |
Each correction has:
topic — what category (classification, scope, root-cause, affected-platforms, etc.)upstream — what the upstream step saidcorrected — what this step actually foundsource — which upstream step is being corrected ("triage" or "repro" for fix; always "triage" for repro)Rules:
Pipeline progress per issue can be determined by checking which artifacts exist:
| Artifacts present | Pipeline state |
|---|---|
ai-triage only | Triaged, awaiting repro |
ai-triage + ai-repro (conclusion: reproduced) | Reproduced, awaiting fix |
ai-triage + ai-repro (conclusion: not-reproduced) | Not reproduced — may need more info |
ai-triage + ai-repro (conclusion: confirmed) | Feature/docs gap confirmed — awaiting implementation |
ai-triage + ai-repro (conclusion: not-confirmed) | Claim not confirmed — may close or request info |
ai-triage + ai-repro + ai-fix (status: in-progress) | Fix in progress |
ai-triage + ai-repro + ai-fix (status: fixed) | Fixed ✅ |
ai-triage + ai-repro + ai-fix (status: cannot-fix) | Blocked — needs upstream or different approach |
To check pipeline status for an issue:
CACHE=".data-cache/repos/mono-SkiaSharp"
N=1234
[ -f "$CACHE/ai-triage/$N.json" ] && echo "✅ Triaged"
[ -f "$CACHE/ai-repro/$N.json" ] && echo "✅ Reproduced" && python3 -c "import json; print(' conclusion:', json.load(open('$CACHE/ai-repro/$N.json'))['conclusion'])"
[ -f "$CACHE/ai-fix/$N.json" ] && echo "✅ Fix" && python3 -c "import json; print(' status:', json.load(open('$CACHE/ai-fix/$N.json'))['status']['value'])"