Project Mundial β World Cup 2026 Football Analysis
This project produces pure football analysis (no betting odds, no expert picks) for every World Cup 2026 match,
using a multi-agent pipeline with ensemble consensus and post-event validation. This document is the operator's
manual for running the pipeline end-to-end.
1. Read These First (mandatory)
Before running anything, read these methodology docs in this order:
| Doc | Purpose |
|---|---|
about-methodology.md |
Public methodology (TL;DR format, Findings, standards). Published to gister. |
backlog/docs/doc-1 - Pre-Match-Football-Analysis-Methodology.md |
Internal methodology β Findings 1β12, Finding 4a (attack-gutted rule), Post-Event Validation Checklist (12 categories) |
backlog/docs/doc-5 - Strategic-Decision-Framework.md |
6-step decision graph β replaces the flat checklist. ALWAYS apply this for pre-match. |
backlog/docs/doc-4 - Multi-Agent-Analysis-Pipeline-Ensemble-Workflow.md |
Pipeline process + cross-match model calibration notes |
backlog/docs/doc-3 |
Complete groups/schedule reference (find the match, confirm group + venue + kickoff) |
predictions-summary.md |
Master results table (cumulative calibration, all validated matches) |
2. Agents (7 total, in ~/.pi/agent/agents/)
Gathering layer (run in PARALLEL, model: MiniMax-M3)
| Agent | File | Gathers |
|---|---|---|
match-scout |
match-scout.md |
Venue, roof open/closed, weather (match-day NWS forecast w/ timestamp), base camps, travel, H2H, group context, manager name + temperament, contender tier |
injury-sweeper |
injury-sweeper.md |
Injuries, suspensions, fitness, GK confirmation, squad disruptions. Search in BOTH teams' local languages. |
referee-profiler |
referee-profiler.md |
Assigned ref's card rate, penalty rate (critical), strict/lenient, controversies, confederation sympathy. Apply 20β25% tournament leniency discount. |
Synthesis layer (run in PARALLEL, 3 models for ensemble)
| Agent | File | Model | Notes |
|---|---|---|---|
match-writer |
match-writer.md |
MiniMax-M3 | Default. Most conservative on favorites. |
match-writer-g4 |
match-writer-g4.md |
glm-5-turbo | Replaced grok-4.3 (Jun 19). Fresh variant, no prior bias calibration. Previous g4 was the systemic outlier (72.7% winner hit, never closest on scorelines) β replaced with GLM-5 Turbo for better ensemble diversity. |
match-writer-g5 |
match-writer-g5.md |
zai/glm-5.2 | Best discipline. Cleanest Finding 11 reasoning. Project default for quality. |
match-writer-g51 |
match-writer-g51.md |
zai/glm-5.1 | A/B control pin to glm-5.1 (during the glm-5.2 validation window, Jun 17+). Identical role to g5. |
βοΈ match-writer prompts are GENERATED, not hand-edited. Source of truth:
agents-src/_core.md(shared body + calibration rules) + the thin variant files. Runnode agents-src/build.mjsto regenerate.pi/agents/match-writer*.md(full system prompts, max adherence, compaction-safe). The build validates at build time β dead paths, unfilled tokens, YAML-unsafe frontmatter, and calibration-rule-count drift all fail the build. Flags:--diff(dry-run),--check(validation only). This is why the calibration rules are byte-identical across all 4 variants.π
agents-src/lives in the PROJECT ROOT (not.pi/) β this avoids the safe-guard protected-path prompt on every_core.mdedit. The build writes generated outputs to.pi/agents/via bash/fs (which safe-guard doesn't intercept). The 4 gathering agents (match-scout,injury-sweeper,referee-profiler,post-event-scout) are hand-edited in.pi/agents/(rarely changed).π Agents live in the PROJECT (
.pi/agents/), not global. They're mundial-specific. Invoke withagentScope: "project"(or"both") β the subagent tool defaults to"user"and won't find them otherwise. Generatedmatch-writer*.mdare.gitignored (rebuilt from source); the 4 gathering agents (match-scout,injury-sweeper,referee-profiler,post-event-scout) are hand-edited and committed.
Post-event layer (run AFTER kickoff)
| Agent | File | Model | Role |
|---|---|---|---|
post-event-scout |
post-event-scout.md |
MiniMax-M3 | Gatherer. All 12 Post-Event Validation Checklist categories (winner, scoreline, who scores, weather, possession, xG, cards/pens, lineup, GK, subs, Finding 12 check, learnings). Returns factual brief + archives sources. Does NOT write the review. |
post-event-writer |
post-event-writer.md |
zai/glm-5.2 | Reviewer. Takes the scout brief + pre-match analysis, writes the full {code}-2026-post-event-review.md (TL;DR, calibration score via rubric in doc-1, finding hits/misses, key learnings, standings). Run scout β writer in sequence; the writer can be parallelized across matches landing at once. Lead retains publish/profiles/backlog/summary. |
Post-event workflow:
post-event-scout(gather) βpost-event-writer(review, rubric-scored) β lead publishes + updates team profiles + closes backlog task. The rubric (100-pt scale: Winner/Scoreline/Who-Scores/Findings/Model-breaking) lives in doc-1 Β§ Post-Event Calibration Rubric. Adopted Jun 23 (TASK-97).
Model-qualified syntax: When invoking models, use provider-qualified names (
zai/glm-5.1), never bare names
(bareglm-5.1may resolve to an unauthenticated alias).
3. Source Directory Structure
Sources are split into canonical reference (stable, shared, de-duplicated) and per-match (match-specific application). Gathering agents write to BOTH β canonical profiles are updated, match dirs hold the thin match-specific delta.
sources/
βββ reference/ β CANONICAL (stable, shared across matches)
β βββ wc2026-full-schedule.md (groups + schedule)
β βββ referees/{surname}.md (career profile + assignments log β UPDATED, not re-gathered)
β βββ venues/{city-slug}.md (roof, capacity, altitude, climate-control β stable)
βββ matches/{code1}-vs-{code2}/ β PER-MATCH (thin delta + match-specific only)
βββ scout/ β match-scout output (H2H, THIS-opponent tactics, group math, match-day weather)
βββ team-news-{t1}/ β injury-sweeper output for team 1 (suspensions, fresh injuries, projected XI vs THIS opponent)
βββ team-news-{t2}/ β injury-sweeper output for team 2
βββ referee/ β match-specific application only (assignment + how THIS ref affects THIS matchup + discounted card/pen prediction)
βββ weather/ β (optional; match-day forecast with timestamp)
βββ post-event/ β always match-specific
βββ archive-superseded/ β old/superseded files MOVED HERE (never delete)
Source hygiene rules:
- Writers read BOTH layers: their assigned match dir (thin delta) AND the canonical profiles for both teams + the referee + the venue. Canonical profiles are CURRENT and CURATED β they are not "contamination."
- Never cross-reference sibling match dirs (stale/contradictory intel = noise). This rule is about match-to-match contamination, NOT about reading canonical reference profiles.
- Canonical profiles are UPDATED (append-dated sections, never delete β audit trail). The first match to profile a ref/venue/team CREATES the canonical; subsequent matches UPDATE it + log the assignment.
- Superseded files go to
archive-superseded/, never deleted. - Match code convention: lowercase 3-letter codes, e.g.
eng-vs-cro,por-vs-drc.
Phase status (Jun 18):
- β
Phase 1 LIVE β referees + venues canonical layer. 19 referee profiles + 7 venue profiles in
sources/reference/. Gathering agents update canonical profiles + log assignments; match dirs hold only match-specific application. - β
Phase 2 LIVE β teams canonical layer.
sources/reference/teams/{code}.mdholds stable team identity (squad, manager, tactical signature, GK, form), UPDATED per matchday. injury-sweeper creates/updates the canonical; match dirteam-news-{code}/holds only the thin per-match delta (suspensions, fresh injuries, projected XI vs THIS opponent). Writers read BOTH layers. Seeded with CZE + RSA (MD2); remaining teams get canonical profiles created lazily on their next analysis.
4. Full Pipeline β Pre-Match (the standard run)
Step 0: Task setup
backlog_task_edit <id> -s "In Progress" -a agent
mkdir -p sources/matches/{code1}-vs-{code2}/{scout,team-news-{t1},team-news-{t2},referee,weather}
Step 1: Gathering (3 agents in PARALLEL via subagent tool)
Fire all three gathering agents at once. Each writes to its subdirectory. Wait for all 3 to complete before synthesis.
Key things each agent MUST surface (these are model-breaking if missed):
- Roof open/closed (determines if Finding 11 weather penalty applies)
- Manager NAME + temperament (conservative vs aggressive β determines Finding 12 conservation)
- Group context (is this the strongest/weakest group opponent? β need-to-win flag)
- GK confirmation (GK changes are model-breaking β e.g. FRA-SEN Mendy vs Diaw ambiguity)
- Referee penalty rate (a high pen rate tilts the favorite's scoring mix β but present as a ~30-40% band, NOT a near-certainty; validated POR-DRC: 0.40-0.45 rate β 0 pens)
- Injuries in local languages (don't miss non-English sources)
Step 2: Decision graph (doc-5) β EACH WRITER resolves independently (NOT the lead)
β‘ CHANGED Jun 23 (TASK-99). Previously the lead pre-resolved the 6-step graph and passed a synthesis block to all writers. This produced artificially tight spreads (1pt) and suppressed genuine analytical disagreement (e.g., the Ronaldo-vs-Bruno Who Scores debate). Validated via POR-UZB controlled re-run: independent resolution gave a 5pt spread and surfaced a real scorer disagreement the pre-resolution had flattened.
The framework (doc-1 Findings + doc-5 graph) is mandatory and unchanged. What changed is WHO resolves it: each writer, not the lead. The lead's role becomes verification + reconciliation, not resolution.
Writers walk all 6 steps themselves (mandatory Β§6.5 output section, baked into _core.md via build):
- Group context β standings, must-win flags, urgency asymmetry
- Conservation (F12) β resolve the discount yourself with justification (defending champion β reduce; manager personality > tier; milestone = no conservation). Range 0β8%.
- Weather Γ style (F11) β heat threshold (>28Β°C degrades pressing by 60'). Neutralized if roof closed.
- Weather Γ defense stack β heat + low block + hot GK = DRAW. Heat + open shape = goals.
- Temperament β coach discipline, executability of the game plan.
- Synthesis β combine into final probability adjustments, show the math (naive β adjusted).
The lead's task template MUST NOT include a pre-resolved synthesis block. Replace it with: *"Walk doc-5's 6 steps yourself using doc-1's Findings + briefs + predictions-summary. State your resolution per step with reasoning. Do NOT anchor on any lead-provided number."
Step 3: Synthesis (3 writers in PARALLEL, independent resolution)
Fire all three match-writers (mm3/g4/g5) at once, each reading the SAME self-contained source dir. Each writer resolves the decision graph independently (Step 2 above) and produces its own probabilities + Who Scores list. Expect HONEST SPREADS β a 1pt spread is correlation (something's wrong); a 3β7pt spread is genuine uncertainty (correct ensemble behavior).
Step 4: Consensus document (you write this β RECONCILE, don't average)
Write {code1}-vs-{code2}-2026-consensus-ensemble.md:
- Reconcile with reasoning, don't blindly average. A 5pt spread means the match is genuinely uncertain β say so. Flag outliers (>10pts) with reasoning, don't just drop them.
- Note the spread explicitly ("spread: 5pt (70-75% POR) β honest uncertainty"). Narrow spreads (1-2pt) should now be rare and noteworthy; if you see one, suspect the writers anchored on a shared input and flag it.
- Reconcile scorelines (modal pick + runner-up)
- Reconcile Who Scores (consensus #1 + disagreement notes β if writers split on #1, that IS the finding; document both cases)
- Document the decision graph resolution (the convergence points + the disagreement points)
- TL;DR FIRST: 1 bold headline line (win% / scoreline / who scores) β 4β6 short bullets β 1 "Watch:" line
Step 5: Publish
gister {file}.md --group {code1}-vs-{code2} # NEVER use --auto-tag
gister {mm3-file}.md --group {code1}-vs-{code2}
gister {g4-file}.md --group {code1}-vs-{code2}
gister {g5-file}.md --group {code1}-vs-{code2}
gister {consensus-file}.md --group {code1}-vs-{code2}
Links in summaries use relative gister slugs (/eng-vs-cro/eng-vs-cro-2026-consensus-ensemble), NOT absolute URLs or file paths.
Step 6: Close task
backlog_task_edit <id> --final-summary "..." -s Done
5. Post-Event Review (after the match)
After kickoff, run the post-event-scout agent to gather the 12 checklist categories, then write {code}-2026-post-event-review.md:
Mandatory 12 categories (no blanks β a blank category is a process failure):
- Winner (was the consensus favorite correct?)
- Exact scoreline (was it in the top 3?)
- Who Scores (did the #1 pick score? β₯1 hit is the bar)
- Weather (forecast vs actual β validate EVERY time)
- Possession (use FINAL stats, never halftime)
- xG
- Cards / penalties (was the referee profile right?)
- Lineup (did the predicted XI start?)
- GK (was the confirmed GK correct? GK changes are model-breaking)
- Substitutions (did the predicted sub risks materialize?)
- Finding 12 (did conservation/not-conservation play out as predicted?)
- Key learnings (what to calibrate?)
Always use FINAL stats, never halftime figures. (NED-JPN possession: 69% HT β 59.8% FT.)
Publish to the match group: gister {review}.md --group {code1}-vs-{code2}
6. Hard Rules & Constraints
| Rule | Detail |
|---|---|
| β NO FABRICATION β source-ground EVERY factual claim (HIGHEST PRECEDENCE) | Never state a match result, scoreline, lineup, standings position, or any factual data point unless it is grounded in an explicit source (a gathered file, a live search result, a BBC/Guardian/FotMob/ESPN report). If you cannot confirm a fact, leave it BLANK or flag it (UNCONFIRMED / plays [date]) β do NOT interpolate, infer, or guess. Unknown data is acceptable; fabricated data is a project-killing integrity failure. This applies to the lead orchestrator writing standings tables, the post-event scout stating scores, and writers referencing results. (Added Jun 18 after the lead fabricated a MEX-KOR result for a match that had not been played β caught by the user.) Specifically: when writing a group standings table, mark every unplayed match as (plays [date]); never fill a cell from imagination even if it "looks plausible." |
| Validate scores against N sources before publishing | A final score must be confirmed by β₯2 independent sources (BBC/Guardian/FotMob/Opta/ESPN) before it enters a post-event review or the master table. A single stale live-blog is NOT sufficient (CZE-RSA was initially mis-reported as 1-0 from a stale blog; actual was 1-1). If sources disagree, wait or flag the discrepancy β never pick one silently. |
| No betting odds / no expert picks | Pure football analysis based on verifiable data only. |
| TL;DR bullet format | Every report opens with: 1 bold headline β 4β6 one-line bullets β 1 "Watch:" line. No text walls. |
| Title format | TeamA vs. TeamB - Analysis Type |
| Who Scores section mandatory | Every pre-match analysis must include player-level scoring predictions (top 3β5 per team). |
| Weather = match-day NWS/official forecast with timestamp | NOT general climate guides. (FRA-SEN error validated this.) |
| Winner prediction β exact scoreline | Don't conflate them β they're different validation categories. |
| Finding 4a trigger | 25β30pt "attack gutted" downgrade ONLY when losing 2+ of {main creator, main striker, GK}. A SINGLE absence = β3 to β5pt, NOT gutting. (g4 misapplied this on AUT-JOR β calibrated.) |
| Finding 12 is context-dependent | Defending champions β REDUCE discount (they make statements). Manager personality > tier (conservative mgr conserves; aggressive doesn't). Milestone motivation = NO conservation. |
| Regional ground transport β intercontinental disruption | Don't apply Finding 11 travel penalty for same-state bus rides. |
No --auto-tag ever |
--auto-tag is opt-in, disabled permanently. |
| β ALWAYS check current date/time vs FIFA schedule before staging | Before firing gatherers/writers, verify (a) today's date/time (date), (b) which matches actually kick off today from a CURRENT source (FIFA/ESPN fixture list), (c) the kickoff time in CEST. Do NOT trust memory or prior assumptions about kickoff dates. Known failure modes: (1) missing today's matches entirely (CAN-SUI/BiH-QAT Jun 24 missed), (2) staging matches 1-2 days early (USA-TUR/PAR-AUS staged Jun 24 for a Jun 26 kickoff). Always confirm: node ~/.pi/agent/skills/web-search/search.js "[teams] kickoff time June [day] World Cup" BEFORE staging. |
| Model-qualified syntax | zai/glm-5.1 required; bare glm-5.1 resolves to wrong alias. |
| GK confirmed before kickoff | GK changes are model-breaking. Always nail down the starting GK. |
7. Tools Quick Reference
| Tool | Location / command |
|---|---|
| Backlog.md | backlog_task_* functions (see guidelines below). Use --plain for AI output. |
| Brave Search | /home/godot/.pi/agent/skills/pi-skills/brave-search/search.js (flags: -n, --content, --freshness, --country) |
| Content extraction | content.js <url> β must run from the brave-search directory, not project root |
| Gister (publish) | gister <file> --group <name> Β· gister --unpublish "<group>/<slug>" Β· gister --list. Host: gist.ps-01-platform.com |
| Subagent (pipeline) | subagent tool β parallel mode for gathering + synthesis, single for post-event |
8. File Naming Conventions
| Type | Pattern | Example |
|---|---|---|
| Pre-match (single) | {code}-2026-pure-football-analysis.md |
eng-vs-cro-2026-pure-football-analysis.md |
| Pre-match (per model) | {code}-2026-pure-football-analysis-{mm3|g4|g5}.md |
eng-vs-cro-2026-pure-football-analysis-g5.md |
| Consensus | {code}-2026-consensus-ensemble.md |
eng-vs-cro-2026-consensus-ensemble.md |
| Post-event | {code}-2026-post-event-review.md |
eng-vs-cro-2026-post-event-review.md |
| Live report | {code}-2026-live-report.md |
(only if monitoring live) |
9. Known Model Calibration Patterns (from 30 ensemble matches, auto-extracted by agent-accuracy.mjs)
Updated Jun 26, 2026. Stats auto-extracted from TOML blocks + post-event reviews. See
agent-accuracy-report.mdfor full narrative.
| Agent | Model | N | Winner % | Exact Score % | Avg Dist | Scorer % | Closest |
|---|---|---|---|---|---|---|---|
| mm3 | MiniMax-M3 | 25 | 68% | 12% | 2.0 | 44% | 15x |
| g4 | glm-5-turbo | 30 | 60% | 17% | 1.9 | 43% | 11x |
| g5 | zai/glm-5.2 | 29 | 69% | 17% | 1.8 | 38% | 4x |
Division of labor (validated over 30 matches):
- g5 = best aggregate accuracy (69% winner, lowest avg dist 1.8). Best on routine favorites. NOT the blowout specialist (that label was wrong β all agents under-predict blowout margins).
- mm3 = draw/upset hedge (closest 15x, highest scorer hit 44%). Consistently runs highest draw band. Best on upset/draw days (ENG-GHA, SCO-MAR, TUR-PAR, GER-ECU).
- g4 = tight-favorite-exact specialist (17% exact, best on close games). Volume backbone (N=30, never absent). Contrarian β flags dead-rubber upsets (USA-TUR) + mutual draws (JPN-SWE) as live.
TASK-99 impact (Jun 23+): Average spread widened from ~2pt (pre-TASK-99, artificial anchoring) to 8.1pt (post-TASK-99, honest independence). TASK-99 makes the pipeline honest, not prescient β wide spreads flag uncertainty correctly, but upsets still live in the tail (0/3 agents called GER-ECU or USA-TUR, but the 18pt spread correctly signaled "uncertain").
Other patterns (validated):
- Unanimous #1 scorer picks with milestone motivation are high-confidence (Messi 18 WC goals, MbappΓ© tied Klose 16, Haaland 12-game streak, Ronaldo FIRST to score at 6 WCs β all braced). BUT requires a finishing mechanism (weak GK/pen band/mobility swap). Milestone alone = minutes not goals (Kane ENG-GHA 86' miss).
- Blowout underestimate is systematic (GER 7-1, NED 5-1, POR 5-0): all agents under-predict 4+ margins when elite attack + non-veteran-GK block. Weight 15-20% on 4+ margin.
- Draw epidemic has a boundary: applies when underdog has low block + hot GK, NOT when favorite has generational scorer + open-shape underdog.
- Referee leniency discount ~20-25% confirmed at tournaments. Some refs have INVERTED discounts (Makkelie = tournament card-happy, 5.50 Y/gm vs 2.57 career).
Instructions for the usage of Backlog.md CLI Tool
Backlog.md: Comprehensive Project Management Tool via CLI
Assistant Objective
Efficiently manage all project tasks, status, and documentation using the Backlog.md CLI, ensuring all project metadata
remains fully synchronized and up-to-date.
Core Capabilities
- β Task Management: Create, edit, assign, prioritize, and track tasks with full metadata
- β
Search: Fuzzy search across tasks, documents, and decisions with
backlog search - β Acceptance Criteria: Granular control with add/remove/check/uncheck by index
- β Definition of Done checklists: Per-task DoD items with add/remove/check/uncheck
- β
Board Visualization: Terminal-based Kanban board (
backlog board) and web UI (backlog browser) - β Git Integration: Automatic tracking of task states across branches
- β Dependencies: Task relationships and subtask hierarchies
- β Documentation & Decisions: Structured docs and architectural decision records
- β Export & Reporting: Generate markdown reports and board snapshots
- β
AI-Optimized:
--plainflag provides clean text output for AI processing
Why This Matters to You (AI Agent)
- Comprehensive system - Full project management capabilities through CLI
- The CLI is the interface - All operations go through
backlogcommands - Unified interaction model - You can use CLI for both reading (
backlog task 1 --plain) and writing (
backlog task edit 1) - Metadata stays synchronized - The CLI handles all the complex relationships
Key Understanding
- Tasks live in
backlog/tasks/astask-<id> - <title>.mdfiles - You interact via CLI only:
backlog task create,backlog task edit, etc. - Use
--plainflag for AI-friendly output when viewing/listing - Never bypass the CLI - It handles Git, metadata, file naming, and relationships
β οΈ CRITICAL: NEVER EDIT TASK FILES DIRECTLY. Edit Only via CLI
ALL task operations MUST use the Backlog.md CLI commands
- β
DO: Use
backlog task editand other CLI commands - β
DO: Use
backlog task createto create new tasks - β
DO: Use
backlog task edit <id> --check-ac <index>to mark acceptance criteria - β DON'T: Edit markdown files directly
- β DON'T: Manually change checkboxes in files
- β DON'T: Add or modify text in task files without using CLI
Why? Direct file editing breaks metadata synchronization, Git tracking, and task relationships.
1. Source of Truth & File Structure
π UNDERSTANDING (What you'll see when reading)
- Markdown task files live under
backlog/tasks/(drafts underbacklog/drafts/) - Files are named:
task-<id> - <title>.md(e.g.,task-42 - Add GraphQL resolver.md) - Project documentation is in
backlog/docs/ - Project decisions are in
backlog/decisions/
π§ ACTING (How to change things)
- All task operations MUST use the Backlog.md CLI tool
- This ensures metadata is correctly updated and the project stays in sync
- Always use
--plainflag when listing or viewing tasks for AI-friendly text output
2. Common Mistakes to Avoid
β WRONG: Direct File Editing
# DON'T DO THIS:
1. Open backlog/tasks/task-7 - Feature.md in editor
2. Change "- [ ]" to "- [x]" manually
3. Add notes or final summary directly to the file
4. Save the file
β CORRECT: Using CLI Commands
# DO THIS INSTEAD:
backlog task edit 7 --check-ac 1 # Mark AC #1 as complete
backlog task edit 7 --notes "Implementation complete" # Add notes
backlog task edit 7 --final-summary "PR-style summary" # Add final summary
backlog task edit 7 -s "In Progress" -a @agent-k # Multiple commands: change status and assign the task when you start working on the task
3. Understanding Task Format (Read-Only Reference)
β οΈ FORMAT REFERENCE ONLY - The following sections show what you'll SEE in task files.
Never edit these directly! Use CLI commands to make changes.
Task Structure You'll See
---
id: task-42
title: Add GraphQL resolver
status: To Do
assignee: [@sara]
labels: [backend, api]
---
## Description
Brief explanation of the task purpose.
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 First criterion
- [x] #2 Second criterion (completed)
- [ ] #3 Third criterion
<!-- AC:END -->
## Definition of Done
<!-- DOD:BEGIN -->
- [ ] #1 Tests pass
- [ ] #2 Docs updated
<!-- DOD:END -->
## Implementation Plan
1. Research approach
2. Implement solution
## Implementation Notes
Progress notes captured during implementation.
## Final Summary
PR-style summary of what was implemented.
How to Modify Each Section
| What You Want to Change | CLI Command to Use |
|---|---|
| Title | backlog task edit 42 -t "New Title" |
| Status | backlog task edit 42 -s "In Progress" |
| Assignee | backlog task edit 42 -a @sara |
| Labels | backlog task edit 42 -l backend,api |
| Description | backlog task edit 42 -d "New description" |
| Add AC | backlog task edit 42 --ac "New criterion" |
| Add DoD | backlog task edit 42 --dod "Ship notes" |
| Check AC #1 | backlog task edit 42 --check-ac 1 |
| Check DoD #1 | backlog task edit 42 --check-dod 1 |
| Uncheck AC #2 | backlog task edit 42 --uncheck-ac 2 |
| Uncheck DoD #2 | backlog task edit 42 --uncheck-dod 2 |
| Remove AC #3 | backlog task edit 42 --remove-ac 3 |
| Remove DoD #3 | backlog task edit 42 --remove-dod 3 |
| Add Plan | backlog task edit 42 --plan "1. Step one\n2. Step two" |
| Add Notes (replace) | backlog task edit 42 --notes "What I did" |
| Append Notes | backlog task edit 42 --append-notes "Another note" |
| Add Final Summary | backlog task edit 42 --final-summary "PR-style summary" |
| Append Final Summary | backlog task edit 42 --append-final-summary "Another detail" |
| Clear Final Summary | backlog task edit 42 --clear-final-summary |
4. Defining Tasks
Creating New Tasks
Always use CLI to create tasks:
# Example
backlog task create "Task title" -d "Description" --ac "First criterion" --ac "Second criterion"
Title (one liner)
Use a clear brief title that summarizes the task.
Description (The "why")
Provide a concise summary of the task purpose and its goal. Explains the context without implementation details.
Acceptance Criteria (The "what")
Understanding the Format:
- Acceptance criteria appear as numbered checkboxes in the markdown files
- Format:
- [ ] #1 Criterion text(unchecked) or- [x] #1 Criterion text(checked)
Managing Acceptance Criteria via CLI:
β οΈ IMPORTANT: How AC Commands Work
- Adding criteria (
--ac) accepts multiple flags:--ac "First" --ac "Second"β - Checking/unchecking/removing accept multiple flags too:
--check-ac 1 --check-ac 2β - Mixed operations work in a single command:
--check-ac 1 --uncheck-ac 2 --remove-ac 3β
# Examples
# Add new criteria (MULTIPLE values allowed)
backlog task edit 42 --ac "User can login" --ac "Session persists"
# Check specific criteria by index (MULTIPLE values supported)
backlog task edit 42 --check-ac 1 --check-ac 2 --check-ac 3 # Check multiple ACs
# Or check them individually if you prefer:
backlog task edit 42 --check-ac 1 # Mark #1 as complete
backlog task edit 42 --check-ac 2 # Mark #2 as complete
# Mixed operations in single command
backlog task edit 42 --check-ac 1 --uncheck-ac 2 --remove-ac 3
# β STILL WRONG - These formats don't work:
# backlog task edit 42 --check-ac 1,2,3 # No comma-separated values
# backlog task edit 42 --check-ac 1-3 # No ranges
# backlog task edit 42 --check 1 # Wrong flag name
# Multiple operations of same type
backlog task edit 42 --uncheck-ac 1 --uncheck-ac 2 # Uncheck multiple ACs
backlog task edit 42 --remove-ac 2 --remove-ac 4 # Remove multiple ACs (processed high-to-low)
Definition of Done checklist (per-task)
Definition of Done items are a second checklist in each task. Defaults come from definition_of_done in the project config file (backlog/config.yml, .backlog/config.yml, or backlog.config.yml) or from Web UI Settings, and can be disabled per task.
Managing Definition of Done via CLI:
# Add DoD items (MULTIPLE values allowed)
backlog task edit 42 --dod "Run tests" --dod "Update docs"
# Check/uncheck DoD items by index (MULTIPLE values supported)
backlog task edit 42 --check-dod 1 --check-dod 2
backlog task edit 42 --uncheck-dod 1
# Remove DoD items by index
backlog task edit 42 --remove-dod 2
# Create without defaults
backlog task create "Feature" --no-dod-defaults
Key Principles for Good ACs:
- Outcome-Oriented: Focus on the result, not the method.
- Testable/Verifiable: Each criterion should be objectively testable
- Clear and Concise: Unambiguous language
- Complete: Collectively cover the task scope
- User-Focused: Frame from end-user or system behavior perspective
Good Examples:
- "User can successfully log in with valid credentials"
- "System processes 1000 requests per second without errors"
- "CLI preserves literal newlines in description/plan/notes/final summary;
\\nsequences are not autoβconverted"
Bad Example (Implementation Step):
- "Add a new function handleLogin() in auth.ts"
- "Define expected behavior and document supported input patterns"
Task Breakdown Strategy
- Identify foundational components first
- Create tasks in dependency order (foundations before features)
- Ensure each task delivers value independently
- Avoid creating tasks that block each other
Task Requirements
- Tasks must be atomic and testable or verifiable
- Each task should represent a single unit of work for one PR
- Never reference future tasks (only tasks with id < current task id)
- Ensure tasks are independent and don't depend on future work
5. Implementing Tasks
5.1. First step when implementing a task
The very first things you must do when you take over a task are:
- set the task in progress
- assign it to yourself
# Example
backlog task edit 42 -s "In Progress" -a @{myself}
5.2. Review Task References and Documentation
Before planning, check if the task has any attached references or documentation:
- References: Related code files, GitHub issues, or URLs relevant to the implementation
- Documentation: Design docs, API specs, or other materials for understanding context
These are visible in the task view output. Review them to understand the full context before drafting your plan.
5.3. Create an Implementation Plan (The "how")
Previously created tasks contain the why and the what. Once you are familiar with that part you should think about a
plan on HOW to tackle the task and all its acceptance criteria. This is your Implementation Plan.
First do a quick check to see if all the tools that you are planning to use are available in the environment you are
working in.
When you are ready, write it down in the task so that you can refer to it later.
# Example
backlog task edit 42 --plan "1. Research codebase for references\n2Research on internet for similar cases\n3. Implement\n4. Test"
5.4. Implementation
Once you have a plan, you can start implementing the task. This is where you write code, run tests, and make sure
everything works as expected. Follow the acceptance criteria one by one and MARK THEM AS COMPLETE as soon as you
finish them.
5.5 Implementation Notes (Progress log)
Use Implementation Notes to log progress, decisions, and blockers as you work.
Append notes progressively during implementation using --append-notes:
backlog task edit 42 --append-notes "Investigated root cause" --append-notes "Added tests for edge case"
# Example
backlog task edit 42 --notes "Initial implementation done; pending integration tests"
5.6 Final Summary (PR description)
When you are done implementing a task you need to prepare a PR description for it.
Because you cannot create PRs directly, write the PR as a clean summary in the Final Summary field.
Quality bar: Write it like a reviewer will see it. A oneβliner is rarely enough unless the change is truly trivial.
Include the key scope so someone can understand the impact without reading the whole diff.
# Example
backlog task edit 42 --final-summary "Implemented pattern X because Reason Y; updated files Z and W; added tests"
IMPORTANT: Do NOT include an Implementation Plan when creating a task. The plan is added only after you start the
implementation.
- Creation phase: provide Title, Description, Acceptance Criteria, and optionally labels/priority/assignee.
- When you begin work, switch to edit, set the task in progress and assign to yourself
backlog task edit <id> -s "In Progress" -a "...". - Think about how you would solve the task and add the plan:
backlog task edit <id> --plan "...". - After updating the plan, share it with the user and ask for confirmation. Do not begin coding until the user approves the plan or explicitly tells you to skip the review.
- Append Implementation Notes during implementation using
--append-notesas progress is made. - Add Final Summary only after completing the work:
backlog task edit <id> --final-summary "..."(replace) or append using--append-final-summary.
Phase discipline: What goes where
- Creation: Title, Description, Acceptance Criteria, labels/priority/assignee.
- Implementation: Implementation Plan (after moving to In Progress and assigning to yourself) + Implementation Notes (progress log, appended as you work).
- Wrap-up: Final Summary (PR description), verify AC and Definition of Done checks.
IMPORTANT: Only implement what's in the Acceptance Criteria. If you need to do more, either:
- Update the AC first:
backlog task edit 42 --ac "New requirement" - Or create a new follow up task:
backlog task create "Additional feature"
6. Typical Workflow
# 1. Identify work
backlog task list -s "To Do" --plain
# 2. Read task details
backlog task 42 --plain
# 3. Start work: assign yourself & change status
backlog task edit 42 -s "In Progress" -a @myself
# 4. Add implementation plan
backlog task edit 42 --plan "1. Analyze\n2. Refactor\n3. Test"
# 5. Share the plan with the user and wait for approval (do not write code yet)
# 6. Work on the task (write code, test, etc.)
# 7. Mark acceptance criteria as complete (supports multiple in one command)
backlog task edit 42 --check-ac 1 --check-ac 2 --check-ac 3 # Check all at once
# Or check them individually if preferred:
# backlog task edit 42 --check-ac 1
# backlog task edit 42 --check-ac 2
# backlog task edit 42 --check-ac 3
# 8. Add Final Summary (PR Description)
backlog task edit 42 --final-summary "Refactored using strategy pattern, updated tests"
# 9. Mark task as done
backlog task edit 42 -s Done
7. Definition of Done (DoD)
A task is Done only when ALL of the following are complete:
β Via CLI Commands:
- All acceptance criteria checked: Use
backlog task edit <id> --check-ac <index>for each - All Definition of Done items checked: Use
backlog task edit <id> --check-dod <index>for each - Final Summary added: Use
backlog task edit <id> --final-summary "..." - Status set to Done: Use
backlog task edit <id> -s Done
β Via Code/Testing:
- Tests pass: Run test suite and linting
- Documentation updated: Update relevant docs if needed
- Code reviewed: Self-review your changes
- No regressions: Performance, security checks pass
β οΈ NEVER mark a task as Done without completing ALL items above
8. Finding Tasks and Content with Search
When users ask you to find tasks related to a topic, use the backlog search command with --plain flag:
# Search for tasks about authentication
backlog search "auth" --plain
# Search only in tasks (not docs/decisions)
backlog search "login" --type task --plain
# Search with filters
backlog search "api" --status "In Progress" --plain
backlog search "bug" --priority high --plain
Key points:
- Uses fuzzy matching - finds "authentication" when searching "auth"
- Searches task titles, descriptions, and content
- Also searches documents and decisions unless filtered with
--type task - Always use
--plainflag for AI-readable output
9. Quick Reference: DO vs DON'T
Viewing and Finding Tasks
| Task | β DO | β DON'T |
|---|---|---|
| View task | backlog task 42 --plain |
Open and read .md file directly |
| List tasks | backlog task list --plain |
Browse backlog/tasks folder |
| Check status | backlog task 42 --plain |
Look at file content |
| Find by topic | backlog search "auth" --plain |
Manually grep through files |
Modifying Tasks
| Task | β DO | β DON'T |
|---|---|---|
| Check AC | backlog task edit 42 --check-ac 1 |
Change - [ ] to - [x] in file |
| Add notes | backlog task edit 42 --notes "..." |
Type notes into .md file |
| Add final summary | backlog task edit 42 --final-summary "..." |
Type summary into .md file |
| Change status | backlog task edit 42 -s Done |
Edit status in frontmatter |
| Add AC | backlog task edit 42 --ac "New" |
Add - [ ] New to file |
10. Complete CLI Command Reference
Task Creation
| Action | Command |
|---|---|
| Create task | backlog task create "Title" |
| With description | backlog task create "Title" -d "Description" |
| With AC | backlog task create "Title" --ac "Criterion 1" --ac "Criterion 2" |
| With final summary | backlog task create "Title" --final-summary "PR-style summary" |
| With references | backlog task create "Title" --ref src/api.ts --ref https://github.com/issue/123 |
| With documentation | backlog task create "Title" --doc https://design-docs.example.com |
| With all options | backlog task create "Title" -d "Desc" -a @sara -s "To Do" -l auth --priority high --ref src/api.ts --doc docs/spec.md |
| Create draft | backlog task create "Title" --draft |
| Create subtask | backlog task create "Title" -p 42 |
Task Modification
| Action | Command |
|---|---|
| Edit title | backlog task edit 42 -t "New Title" |
| Edit description | backlog task edit 42 -d "New description" |
| Change status | backlog task edit 42 -s "In Progress" |
| Assign | backlog task edit 42 -a @sara |
| Add labels | backlog task edit 42 -l backend,api |
| Set priority | backlog task edit 42 --priority high |
Acceptance Criteria Management
| Action | Command |
|---|---|
| Add AC | backlog task edit 42 --ac "New criterion" --ac "Another" |
| Remove AC #2 | backlog task edit 42 --remove-ac 2 |
| Remove multiple ACs | backlog task edit 42 --remove-ac 2 --remove-ac 4 |
| Check AC #1 | backlog task edit 42 --check-ac 1 |
| Check multiple ACs | backlog task edit 42 --check-ac 1 --check-ac 3 |
| Uncheck AC #3 | backlog task edit 42 --uncheck-ac 3 |
| Mixed operations | backlog task edit 42 --check-ac 1 --uncheck-ac 2 --remove-ac 3 --ac "New" |
Task Content
| Action | Command |
|---|---|
| Add plan | backlog task edit 42 --plan "1. Step one\n2. Step two" |
| Add notes | backlog task edit 42 --notes "Implementation details" |
| Add final summary | backlog task edit 42 --final-summary "PR-style summary" |
| Append final summary | backlog task edit 42 --append-final-summary "More details" |
| Clear final summary | backlog task edit 42 --clear-final-summary |
| Add dependencies | backlog task edit 42 --dep task-1 --dep task-2 |
| Add references | backlog task edit 42 --ref src/api.ts --ref https://github.com/issue/123 |
| Add documentation | backlog task edit 42 --doc https://design-docs.example.com --doc docs/spec.md |
Multiβline Input (Description/Plan/Notes/Final Summary)
The CLI preserves input literally. Shells do not convert \n inside normal quotes. Use one of the following to insert real newlines:
- Bash/Zsh (ANSIβC quoting):
- Description:
backlog task edit 42 --desc $'Line1\nLine2\n\nFinal' - Plan:
backlog task edit 42 --plan $'1. A\n2. B' - Notes:
backlog task edit 42 --notes $'Done A\nDoing B' - Append notes:
backlog task edit 42 --append-notes $'Progress update line 1\nLine 2' - Final summary:
backlog task edit 42 --final-summary $'Shipped A\nAdded B' - Append final summary:
backlog task edit 42 --append-final-summary $'Added X\nAdded Y'
- Description:
- POSIX portable (printf):
backlog task edit 42 --notes "$(printf 'Line1\nLine2')"
- PowerShell (backtick n):
backlog task edit 42 --notes "Line1nLine2"`
Do not expect "...\n..." to become a newline. That passes the literal backslash + n to the CLI by design.
Descriptions support literal newlines; shell examples may show escaped \\n, but enter a single \n to create a newline.
Implementation Notes Formatting
-
Keep implementation notes concise and time-ordered; focus on progress, decisions, and blockers.
-
Use short paragraphs or bullet lists instead of a single long line.
-
Use Markdown bullets (
-for unordered,1.for ordered) for readability. -
When using CLI flags like
--append-notes, remember to include explicit
newlines. Example:backlog task edit 42 --append-notes $'- Added new API endpoint\n- Updated tests\n- TODO: monitor staging deploy'
Final Summary Formatting
- Treat the Final Summary as a PR description: lead with the outcome, then add key changes and tests.
- Keep it clean and structured so it can be pasted directly into GitHub.
- Prefer short paragraphs or bullet lists and avoid raw progress logs.
- Aim to cover: what changed, why, user impact, tests run, and risks/followβups when relevant.
- Avoid singleβline summaries unless the change is truly tiny.
Example (good, not rigid):
Added Final Summary support across CLI/MCP/Web/TUI to separate PR summaries from progress notes.
Changes:
- Added `finalSummary` to task types and markdown section parsing/serialization (ordered after notes).
- CLI/MCP/Web/TUI now render and edit Final Summary; plain output includes it.
Tests:
- bun test src/test/final-summary.test.ts
- bun test src/test/cli-final-summary.test.ts
Task Operations
| Action | Command |
|---|---|
| View task | backlog task 42 --plain |
| List tasks | backlog task list --plain |
| Search tasks | backlog search "topic" --plain |
| Search with filter | backlog search "api" --status "To Do" --plain |
| Filter by status | backlog task list -s "In Progress" --plain |
| Filter by assignee | backlog task list -a @sara --plain |
| Archive task | backlog task archive 42 |
| Demote to draft | backlog task demote 42 |
Common Issues
| Problem | Solution |
|---|---|
| Task not found | Check task ID with backlog task list --plain |
| AC won't check | Use correct index: backlog task 42 --plain to see AC numbers |
| Changes not saving | Ensure you're using CLI, not editing files |
| Metadata out of sync | Re-edit via CLI to fix: backlog task edit 42 -s <current-status> |
Remember: The Golden Rule
π― If you want to change ANYTHING in a task, use the backlog task edit command.
π Use CLI to read tasks, exceptionally READ task files directly, never WRITE to them.
Full help available: backlog --help