5.4 KiB
Step 1: Bug Tracking Workflow Initialization
MANDATORY EXECUTION RULES (READ FIRST):
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete triage
- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding
- ✅ ALWAYS treat this as collaborative triage between peers
- 📋 YOU ARE A FACILITATOR, not an automatic processor
- 💬 FOCUS on initialization and setup only - don't look ahead to future steps
- 🚪 DETECT existing workflow state and handle continuation properly
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config
{communication_language}
EXECUTION PROTOCOLS:
- 🎯 Show your analysis before taking any action
- 💾 Initialize bugs.yaml if needed
- 📖 Track workflow state for potential continuation
- 🚫 FORBIDDEN to load next step until setup is complete
CONTEXT BOUNDARIES:
- Variables from workflow.md are available in memory
- bugs.yaml tracks all structured bug metadata
- bugs.md is the user-facing input file
- Don't assume knowledge from other steps
YOUR TASK:
Initialize the Bug Tracking workflow by detecting existing state, discovering input files, and setting up for collaborative triage.
INITIALIZATION SEQUENCE:
1. Check for Existing Session
First, check workflow state:
- Look for existing
{bugs_output}(bugs.yaml) - If exists, grep for bugs with
status: triaged(pending implementation) - Check
{bugs_input}(bugs.md) for items in "# manual input" section
2. Handle Continuation (If Pending Work Exists)
If bugs.yaml exists with triaged bugs awaiting action:
- STOP here and load
./step-01b-continue.mdimmediately - Do not proceed with fresh initialization
- Let step-01b handle the continuation logic
3. Fresh Workflow Setup (If No Pending Work)
If no bugs.yaml exists OR no pending triaged bugs:
A. Input File Discovery
Discover and validate required files:
Required Files:
{bugs_input}(bugs.md) - User-facing bug reports- Must have "# manual input" section for new bugs
- May have "# Tracked Bugs" and "# Fixed Bugs" sections
Optional Context Files:
{sprint_status}- Current sprint context (which stories are in progress){epics_file}- For mapping bugs to related stories/epics
B. Initialize bugs.yaml (If Not Exists)
If bugs.yaml doesn't exist, create it with header structure:
# Bug Tracking Database
# Generated by bug-tracking workflow
# Last updated: {date}
# Severity Definitions:
# - critical: Prevents core functionality, crashes, data loss
# - high: Blocks major features, significantly degrades UX
# - medium: Affects subset of users, minor impact with workaround
# - low: Cosmetic, edge case, or minor inconvenience
# Complexity Definitions:
# - trivial: One-line fix, obvious solution
# - small: Single file/component, solution clear
# - medium: Multiple files OR requires investigation
# - complex: Architectural change, affects many areas
# Workflow Routing Matrix:
# - critical + any → correct-course
# - high + trivial → direct-fix
# - high + small → tech-spec
# - high + medium/complex → correct-course
# - medium + trivial → direct-fix
# - medium + small → tech-spec
# - medium + medium/complex → correct-course
# - low + trivial → direct-fix
# - low + small/medium/complex → backlog
bugs: []
features: []
closed_bugs: []
statistics:
total_active: 0
by_severity:
critical: 0
high: 0
medium: 0
low: 0
last_updated: {date}
C. Scan for New Bugs
Read ONLY the "# manual input" section from bugs.md:
- Grep for "# manual input" to find starting line
- Grep for next section header to find ending line
- Read just that range (do NOT read entire file)
Count items found in manual input section.
D. Complete Initialization and Report
Report to user:
"Welcome {user_name}! I've initialized the Bug Tracking workspace for {project_name}.
Files Status:
- bugs.md: {found/created} - {count} item(s) in manual input section
- bugs.yaml: {found/created} - {active_count} active bugs tracked
Context Files:
- Sprint Status: {loaded/not found}
- Epics: {loaded/not found}
Ready for Triage: {count} new item(s) found in manual input section.
[S] Sync bug reports from API first (if app integration configured) [C] Continue to parse and triage bugs [Q] Quit - no new bugs to triage"
SUCCESS METRICS:
✅ Existing workflow detected and handed off to step-01b correctly ✅ Fresh workflow initialized with bugs.yaml structure ✅ Input files discovered and validated ✅ Manual input section scanned for new items ✅ User informed of status and can proceed
FAILURE MODES:
❌ Proceeding with fresh initialization when pending work exists ❌ Not creating bugs.yaml with proper header/definitions ❌ Reading entire bugs.md instead of just manual input section ❌ Not reporting status to user before proceeding
❌ CRITICAL: Reading only partial step file - leads to incomplete understanding ❌ CRITICAL: Proceeding with 'C' without fully reading the next step file
NEXT STEP:
- If user selects [S], load
./step-02-sync.mdto sync from API - If user selects [C], load
./step-03-parse.mdto parse and identify new bugs - If user selects [Q], end workflow gracefully
Remember: Do NOT proceed until user explicitly selects an option from the menu!