convoke-agents 2.3.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/INSTALLATION.md +109 -86
  3. package/README.md +236 -104
  4. package/UPDATE-GUIDE.md +63 -23
  5. package/_bmad/bme/_enhance/config.yaml +8 -0
  6. package/_bmad/bme/_enhance/extensions/bmm-pm.yaml +9 -0
  7. package/_bmad/bme/_enhance/guides/.gitkeep +0 -0
  8. package/_bmad/bme/_enhance/guides/ENHANCE-GUIDE.md +252 -0
  9. package/_bmad/bme/_enhance/workflows/initiatives-backlog/SKILL.md +6 -0
  10. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-c/.gitkeep +0 -0
  11. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-c/step-c-01-init.md +106 -0
  12. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-c/step-c-02-gather.md +136 -0
  13. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-c/step-c-03-score.md +146 -0
  14. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-c/step-c-04-prioritize.md +181 -0
  15. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-r/.gitkeep +0 -0
  16. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-r/step-r-01-load.md +120 -0
  17. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-r/step-r-02-rescore.md +141 -0
  18. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-r/step-r-03-update.md +154 -0
  19. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/.gitkeep +0 -0
  20. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-01-ingest.md +86 -0
  21. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-02-extract.md +169 -0
  22. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-03-score.md +147 -0
  23. package/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-04-update.md +155 -0
  24. package/_bmad/bme/_enhance/workflows/initiatives-backlog/templates/backlog-format-spec.md +219 -0
  25. package/_bmad/bme/_enhance/workflows/initiatives-backlog/templates/rice-scoring-guide.md +154 -0
  26. package/_bmad/bme/_enhance/workflows/initiatives-backlog/workflow.md +88 -0
  27. package/_bmad/bme/_gyre/README.md +100 -0
  28. package/_bmad/bme/_gyre/agents/.gitkeep +0 -0
  29. package/_bmad/bme/_gyre/agents/model-curator.md +128 -0
  30. package/_bmad/bme/_gyre/agents/readiness-analyst.md +127 -0
  31. package/_bmad/bme/_gyre/agents/review-coach.md +130 -0
  32. package/_bmad/bme/_gyre/agents/stack-detective.md +125 -0
  33. package/_bmad/bme/_gyre/compass-routing-reference.md +168 -0
  34. package/_bmad/bme/_gyre/config.yaml +22 -0
  35. package/_bmad/bme/_gyre/contracts/.gitkeep +0 -0
  36. package/_bmad/bme/_gyre/contracts/gc1-stack-profile.md +152 -0
  37. package/_bmad/bme/_gyre/contracts/gc2-capabilities-manifest.md +189 -0
  38. package/_bmad/bme/_gyre/contracts/gc3-findings-report.md +197 -0
  39. package/_bmad/bme/_gyre/contracts/gc4-feedback-loop.md +209 -0
  40. package/_bmad/bme/_gyre/guides/ATLAS-USER-GUIDE.md +177 -0
  41. package/_bmad/bme/_gyre/guides/COACH-USER-GUIDE.md +172 -0
  42. package/_bmad/bme/_gyre/guides/LENS-USER-GUIDE.md +181 -0
  43. package/_bmad/bme/_gyre/guides/SCOUT-USER-GUIDE.md +158 -0
  44. package/_bmad/bme/_gyre/workflows/.gitkeep +0 -0
  45. package/_bmad/bme/_gyre/workflows/accuracy-validation/steps/step-01-select-repos.md +55 -0
  46. package/_bmad/bme/_gyre/workflows/accuracy-validation/steps/step-02-run-validation.md +78 -0
  47. package/_bmad/bme/_gyre/workflows/accuracy-validation/steps/step-03-score-results.md +143 -0
  48. package/_bmad/bme/_gyre/workflows/accuracy-validation/workflow.md +41 -0
  49. package/_bmad/bme/_gyre/workflows/delta-report/steps/step-01-load-history.md +63 -0
  50. package/_bmad/bme/_gyre/workflows/delta-report/steps/step-02-compute-delta.md +72 -0
  51. package/_bmad/bme/_gyre/workflows/delta-report/steps/step-03-present-delta.md +143 -0
  52. package/_bmad/bme/_gyre/workflows/delta-report/workflow.md +34 -0
  53. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-01-initialize.md +68 -0
  54. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-02-detect-stack.md +49 -0
  55. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-03-generate-model.md +52 -0
  56. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-04-analyze-gaps.md +42 -0
  57. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-05-review-findings.md +128 -0
  58. package/_bmad/bme/_gyre/workflows/full-analysis/workflow.md +39 -0
  59. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-01-load-manifest.md +70 -0
  60. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-02-observability-analysis.md +110 -0
  61. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-03-deployment-analysis.md +87 -0
  62. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-04-cross-domain-correlation.md +105 -0
  63. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-05-present-findings.md +172 -0
  64. package/_bmad/bme/_gyre/workflows/gap-analysis/workflow.md +38 -0
  65. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-01-load-profile.md +74 -0
  66. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-02-generate-capabilities.md +116 -0
  67. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-03-web-enrichment.md +89 -0
  68. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-04-write-manifest.md +122 -0
  69. package/_bmad/bme/_gyre/workflows/model-generation/workflow.md +40 -0
  70. package/_bmad/bme/_gyre/workflows/model-review/steps/step-01-load-context.md +86 -0
  71. package/_bmad/bme/_gyre/workflows/model-review/steps/step-02-walkthrough.md +116 -0
  72. package/_bmad/bme/_gyre/workflows/model-review/steps/step-03-apply-amendments.md +92 -0
  73. package/_bmad/bme/_gyre/workflows/model-review/steps/step-04-capture-feedback.md +107 -0
  74. package/_bmad/bme/_gyre/workflows/model-review/steps/step-05-summary.md +60 -0
  75. package/_bmad/bme/_gyre/workflows/model-review/workflow.md +41 -0
  76. package/_bmad/bme/_gyre/workflows/stack-detection/steps/step-01-scan-filesystem.md +176 -0
  77. package/_bmad/bme/_gyre/workflows/stack-detection/steps/step-02-classify-stack.md +111 -0
  78. package/_bmad/bme/_gyre/workflows/stack-detection/steps/step-03-guard-questions.md +117 -0
  79. package/_bmad/bme/_gyre/workflows/stack-detection/workflow.md +42 -0
  80. package/_bmad/bme/_vortex/config.yaml +1 -1
  81. package/package.json +7 -2
  82. package/scripts/archive.js +304 -0
  83. package/scripts/convoke-doctor.js +146 -132
  84. package/scripts/docs-audit.js +21 -5
  85. package/scripts/install-gyre-agents.js +140 -0
  86. package/scripts/install-vortex-agents.js +0 -0
  87. package/scripts/update/lib/agent-registry.js +70 -0
  88. package/scripts/update/lib/refresh-installation.js +290 -29
  89. package/scripts/update/lib/validator.js +281 -1
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: 'step-t-01-ingest'
3
+ description: 'Accept text input — review transcript, meeting notes, or any findings source'
4
+ nextStepFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-02-extract.md'
5
+ outputFile: '{planning_artifacts}/initiatives-backlog.md'
6
+ ---
7
+
8
+ # Step 1: Ingest Review Findings
9
+
10
+ ## STEP GOAL:
11
+
12
+ Accept the Product Owner's text input (review transcript, meeting notes, audit output, or any findings source) and prepare it for extraction in the next step.
13
+
14
+ ## MANDATORY EXECUTION RULES (READ FIRST):
15
+
16
+ ### Universal Rules:
17
+ - 🛑 NEVER generate content without user input
18
+ - 📖 CRITICAL: Read this complete step file before taking action
19
+ - 🔄 CRITICAL: When loading next step with 'C', read the entire file
20
+ - 📋 YOU ARE A FACILITATOR, not a content generator
21
+
22
+ ### Role Reinforcement:
23
+ - ✅ You are a **findings intake specialist** — your job is to receive and preserve input, not analyze it
24
+ - ✅ Accept whatever format the user provides — do not ask them to restructure
25
+ - ✅ The user brings the review content; you bring careful preservation
26
+
27
+ ### Step-Specific Rules:
28
+ - 🎯 Focus ONLY on accepting and preserving input text
29
+ - 🚫 FORBIDDEN to extract findings, classify, or score in this step — that is step-t-02's job
30
+ - 🚫 FORBIDDEN to truncate, summarize, or skip any part of the input regardless of length (FR46)
31
+ - 💬 Approach: brief prompts, minimal overhead, get to the content quickly
32
+
33
+ ## EXECUTION PROTOCOLS:
34
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
35
+ - 📖 Load existing backlog if present — it will be needed for overlap detection in step-t-02
36
+
37
+ ## CONTEXT BOUNDARIES:
38
+ - Available context: Enhance config (loaded by workflow.md), existing backlog file (if present)
39
+ - Focus: Accepting user input only
40
+ - Limits: Do NOT analyze, classify, or score input
41
+ - Dependencies: workflow.md T dispatch (completed in Story 1.3)
42
+
43
+ ## MANDATORY SEQUENCE
44
+
45
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
46
+
47
+ ### 1. Check for Existing Backlog
48
+
49
+ Check if an existing backlog file exists at `{planning_artifacts}/initiatives-backlog.md`.
50
+
51
+ - **If found:** Load it silently — it will be used for overlap detection in step-t-02. Briefly note to the user: "Existing backlog loaded — overlap detection will be available during extraction."
52
+ - **If not found:** Note silently — step-t-02 will skip overlap detection. Briefly note: "No existing backlog found — a new one will be created."
53
+
54
+ ### 2. Prompt for Text Input
55
+
56
+ Display:
57
+
58
+ > **Triage Mode — Paste your review findings below.**
59
+ >
60
+ > Accepted formats: review transcripts, meeting notes, audit outputs, party-mode outputs, code review findings, retrospective notes, or any text containing actionable observations.
61
+ >
62
+ > Paste your content and press Enter when done.
63
+
64
+ ### 3. Accept and Preserve Input
65
+
66
+ - Accept the user's complete text input
67
+ - Preserve it exactly as provided — do not modify, reformat, or summarize
68
+ - Process the **entire** input regardless of length (FR46)
69
+ - Confirm receipt: "Received [N] lines of input. Ready to extract findings."
70
+
71
+ ### 4. Present MENU OPTIONS
72
+
73
+ Display: "**Select:** [C] Continue to finding extraction"
74
+
75
+ #### Menu Handling Logic:
76
+ - IF C: Load, read the entire file, and execute `{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-02-extract.md`
77
+ - IF any other input: Display "Enter **C** to continue to finding extraction." then redisplay menu
78
+
79
+ #### EXECUTION RULES:
80
+ - ALWAYS halt and wait for user input after presenting the menu
81
+ - ONLY proceed to next step when user selects 'C'
82
+
83
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
84
+ ### ✅ SUCCESS: User's complete text input accepted and preserved, existing backlog loaded if present, proceeding to step-t-02
85
+ ### ❌ SYSTEM FAILURE: Input truncated, content modified, findings extracted prematurely, or user forced to restructure input
86
+ **Master Rule:** Skipping steps is FORBIDDEN.
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: 'step-t-02-extract'
3
+ description: 'Extract actionable findings from input, classify, detect overlaps, and validate at Gate 1'
4
+ nextStepFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-03-score.md'
5
+ outputFile: '{planning_artifacts}/initiatives-backlog.md'
6
+ templateFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/templates/backlog-format-spec.md'
7
+ ---
8
+
9
+ # Step 2: Extract Findings & Gate 1 Validation
10
+
11
+ ## STEP GOAL:
12
+
13
+ Extract actionable findings from the ingested text, classify each into a backlog category, detect overlaps with existing backlog items, and present the batch for user validation at Gate 1.
14
+
15
+ ## MANDATORY EXECUTION RULES (READ FIRST):
16
+
17
+ ### Universal Rules:
18
+ - 🛑 NEVER generate content without user input at Gate 1
19
+ - 📖 CRITICAL: Read this complete step file before taking action
20
+ - 🔄 CRITICAL: When loading next step with 'C', read the entire file
21
+ - 📋 YOU ARE AN ANALYST extracting structured findings from unstructured input
22
+
23
+ ### Role Reinforcement:
24
+ - ✅ You are a **findings extraction analyst** — thorough, systematic, evidence-based
25
+ - ✅ Extract what the input actually says — do not invent findings or impose interpretations
26
+ - ✅ The user validates your extraction at Gate 1 — you propose, they decide
27
+
28
+ ### Step-Specific Rules:
29
+ - 🎯 Focus on extraction, classification, and overlap detection
30
+ - 🚫 FORBIDDEN to score findings (RICE scoring is step-t-03's job)
31
+ - 🚫 FORBIDDEN to write to the backlog file (that is step-t-04's job)
32
+ - 🚫 FORBIDDEN to truncate or skip any part of the input text (FR46)
33
+ - 💬 Approach: systematic extraction, then collaborative validation at Gate 1
34
+
35
+ ## EXECUTION PROTOCOLS:
36
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
37
+ - 📖 Load {templateFile} for category reference
38
+ - 💾 Track extraction state — redisplay updated batch after every Gate 1 edit
39
+
40
+ ## CONTEXT BOUNDARIES:
41
+ - Available context: User's input text (from step-t-01), existing backlog (if loaded), backlog format spec template
42
+ - Focus: Extraction and Gate 1 validation only
43
+ - Limits: Do NOT score or write to backlog
44
+ - Dependencies: step-t-01-ingest.md (input text accepted)
45
+
46
+ ## MANDATORY SEQUENCE
47
+
48
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
49
+
50
+ ### 1. Load Category Reference
51
+
52
+ Load `{templateFile}` (backlog-format-spec.md) and extract the category names from the "Category Names" section. Current categories:
53
+
54
+ - Documentation & Onboarding
55
+ - Update & Migration System
56
+ - Testing & CI
57
+ - Infrastructure
58
+ - Agent Quality & Consistency
59
+ - Platform & Product Vision
60
+
61
+ New categories may be proposed if a finding doesn't fit any existing category.
62
+
63
+ ### 2. Extract Actionable Findings
64
+
65
+ Process the **complete** input text from step-t-01. Do NOT truncate, summarize, or skip sections (FR46).
66
+
67
+ For each passage in the input, determine if it is **actionable**. A finding is actionable if it:
68
+ - **Proposes a change** (something should be different)
69
+ - **Identifies a gap** (something is missing)
70
+ - **Flags a risk** (something could go wrong)
71
+
72
+ Non-actionable content (general comments, praise, questions without implied action, status updates) should be set aside as **observations** — they are NOT included in the extraction batch but may be escalated at Gate 1.
73
+
74
+ For each actionable finding, record:
75
+ 1. **Finding number** — sequential (1, 2, 3...)
76
+ 2. **Title** — concise summary (matches backlog Initiative column style)
77
+ 3. **Category** — one of the categories from step 1 (or propose a new one)
78
+ 4. **Source reference** — which part of the input it came from (e.g., "paragraph 3", "under 'Performance Issues' heading", "line about caching") (FR4)
79
+ 5. **Type** — Change / Gap / Risk
80
+
81
+ ### 3. Detect Overlaps with Existing Backlog
82
+
83
+ **Skip this step if no existing backlog was loaded in step-t-01.**
84
+
85
+ For each extracted finding, compare against existing backlog items by semantic similarity (title + description). Flag potential overlaps when a finding appears to address the same concern as an existing item.
86
+
87
+ For each overlap flag, record:
88
+ - The existing item's **ID** (e.g., D2, P4)
89
+ - The existing item's **title**
90
+ - Brief explanation of why it might overlap
91
+
92
+ ### 4. Handle Zero Findings
93
+
94
+ **If zero actionable findings were extracted:**
95
+
96
+ Display:
97
+
98
+ > **No actionable findings extracted from the input.**
99
+ >
100
+ > The input contained no content that proposes a change, identifies a gap, or flags a risk.
101
+ >
102
+ > **Options:**
103
+ > - Paste a specific passage you'd like me to re-examine
104
+ > - Type **X** to return to the mode selection menu
105
+
106
+ - If user pastes text → re-examine that specific passage for findings, then return to this decision point
107
+ - If user types X → re-load `{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/workflow.md` to return to T/R/C menu
108
+
109
+ **If observations (non-actionable) were found**, list them and note they can be escalated at Gate 1.
110
+
111
+ **Do NOT proceed to Gate 1 if there are zero findings.**
112
+
113
+ ### 5. Present Extraction Batch (Gate 1)
114
+
115
+ Display the extraction results in a numbered list:
116
+
117
+ > **Gate 1 — Review Extracted Findings**
118
+ >
119
+ > **Actionable findings extracted: [N]**
120
+ >
121
+ > | # | Finding | Category | Source | Type | Overlap |
122
+ > |---|---------|----------|--------|------|---------|
123
+ > | 1 | [title] | [category] | [source ref] | Change | — |
124
+ > | 2 | [title] | [category] | [source ref] | Gap | ⚠️ Overlaps D2: "[existing title]" |
125
+ > | 3 | [title] | [category] | [source ref] | Risk | — |
126
+ >
127
+ > **Observations (not included — escalate with `E` if actionable):**
128
+ > - [observation 1]
129
+ > - [observation 2]
130
+
131
+ ### 6. Present GATE 1 MENU OPTIONS
132
+
133
+ Display:
134
+
135
+ > **Gate 1 — Edit the extraction batch:**
136
+ >
137
+ > **Overlap resolution** (for flagged items only):
138
+ > - `merge #N` — Absorb finding into the existing overlapping item
139
+ > - `skip #N` — Drop finding (existing item is sufficient)
140
+ > - `new #N` — Override overlap flag, keep as separate new item
141
+ >
142
+ > **Batch editing:**
143
+ > - `E #N` — Escalate observation #N to actionable finding
144
+ > - `+ [title — description]` — Add a finding the workflow missed
145
+ > - `R #N` — Remove finding #N from the batch
146
+ >
147
+ > **[C] Continue** — Finalize batch and proceed to RICE scoring
148
+
149
+ #### Menu Handling Logic:
150
+ - IF `merge #N`: Mark finding #N as merged with existing item. Remove from batch. Redisplay updated batch and menu.
151
+ - IF `skip #N`: Remove finding #N from batch. Redisplay updated batch and menu.
152
+ - IF `new #N`: Clear overlap flag on finding #N (will be added as new item). Redisplay updated batch and menu.
153
+ - IF `E #N`: Move observation #N into the findings batch as actionable. Assign a category and source ref. Redisplay updated batch and menu.
154
+ - IF `+ [text]`: Add a new finding to the batch. Ask user for category if not obvious. Redisplay updated batch and menu.
155
+ - IF `R #N`: Remove finding #N from the batch. Redisplay updated batch and menu.
156
+ - IF C: Finalize the batch. Load, read the entire file, and execute `{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-03-score.md`
157
+ - IF any other input: Display "Unknown command. Use `merge/skip/new #N`, `E #N`, `+ [text]`, `R #N`, or **C** to continue." then redisplay menu.
158
+
159
+ #### EXECUTION RULES:
160
+ - ALWAYS halt and wait for user input after presenting the menu
161
+ - After EVERY edit action, redisplay the updated extraction batch table AND the menu
162
+ - The user may perform multiple edits before pressing C
163
+ - ONLY proceed to step-t-03 when user selects 'C'
164
+ - Do NOT auto-continue — the user must explicitly approve the batch
165
+
166
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
167
+ ### ✅ SUCCESS: All actionable findings extracted with categories and source refs, overlaps detected, user validated batch at Gate 1, confirmed findings passed to step-t-03
168
+ ### ❌ SYSTEM FAILURE: Input truncated, findings invented (not from input), overlaps missed, user not given Gate 1 validation opportunity, findings scored prematurely
169
+ **Master Rule:** Skipping steps is FORBIDDEN.
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: 'step-t-03-score'
3
+ description: 'Propose RICE scores for confirmed findings, validate at Gate 2, calculate composite scores'
4
+ nextStepFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-04-update.md'
5
+ outputFile: '{planning_artifacts}/initiatives-backlog.md'
6
+ templateFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/templates/rice-scoring-guide.md'
7
+ advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.md'
8
+ partyModeWorkflow: '{project-root}/_bmad/core/workflows/bmad-party-mode/workflow.md'
9
+ ---
10
+
11
+ # Step 3: RICE Scoring & Gate 2 Validation
12
+
13
+ ## STEP GOAL:
14
+
15
+ Propose RICE scores for each confirmed finding from Gate 1, present the scored batch for user validation at Gate 2, and calculate composite scores with proper sorting.
16
+
17
+ ## MANDATORY EXECUTION RULES (READ FIRST):
18
+
19
+ ### Universal Rules:
20
+ - 🛑 NEVER generate content without user input at Gate 2
21
+ - 📖 CRITICAL: Read this complete step file before taking action
22
+ - 🔄 CRITICAL: When loading next step with 'C', read the entire file
23
+ - 📋 YOU ARE A SCORING ANALYST proposing calibrated RICE scores
24
+
25
+ ### Role Reinforcement:
26
+ - ✅ You are a **RICE scoring analyst** — systematic, calibrated, evidence-based
27
+ - ✅ Propose scores grounded in the scoring guide's definitions and calibration examples
28
+ - ✅ The user validates and adjusts your proposals at Gate 2 — you propose, they decide
29
+ - ✅ Compare proposed scores against existing backlog items for calibration consistency
30
+
31
+ ### Step-Specific Rules:
32
+ - 🎯 Focus on scoring, rationale, and composite calculation
33
+ - 🚫 FORBIDDEN to write to the backlog file (that is step-t-04's job)
34
+ - 🚫 FORBIDDEN to re-extract or re-classify findings (that was step-t-02's job)
35
+ - 🚫 FORBIDDEN to add new findings at Gate 2 (that was Gate 1's job — only drops allowed here)
36
+ - 💬 Approach: propose entire batch at once so user sees relative positioning, then collaborative refinement
37
+
38
+ ## EXECUTION PROTOCOLS:
39
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
40
+ - 📖 Load {templateFile} for RICE factor definitions, scales, and calibration examples
41
+ - 💾 Recalculate and re-sort after every Gate 2 adjustment
42
+
43
+ ## CONTEXT BOUNDARIES:
44
+ - Available context: Confirmed findings from Gate 1, existing backlog (if loaded), RICE scoring guide template
45
+ - Focus: Scoring and Gate 2 validation only
46
+ - Limits: Do NOT write to backlog or modify extraction results
47
+ - Dependencies: step-t-02-extract.md (confirmed findings from Gate 1)
48
+
49
+ ## MANDATORY SEQUENCE
50
+
51
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
52
+
53
+ ### 1. Load RICE Scoring Guide
54
+
55
+ Load `{templateFile}` (rice-scoring-guide.md) and internalize:
56
+ - **Factor definitions:** Reach (1-10), Impact (0.25-3), Confidence (20-100%), Effort (1-10)
57
+ - **Guided questions** for each factor
58
+ - **Calibration examples** from the existing backlog (study the reasoning, not just the numbers)
59
+ - **Composite formula:** Score = (R x I x C) / E, where C is decimal (e.g., 70% = 0.7)
60
+ - **Score rounding:** One decimal place for display
61
+
62
+ ### 2. Propose RICE Scores for All Findings
63
+
64
+ For each confirmed finding from Gate 1, propose RICE scores using the guided questions:
65
+
66
+ - **Reach (1-10):** "How many users per quarter will this affect?"
67
+ - **Impact (0.25-3):** "What's the per-user impact?"
68
+ - **Confidence (20-100%):** "How confident are we in these estimates?" Default to 50% when no direct evidence exists.
69
+ - **Effort (1-10):** "Relative effort in story points?"
70
+
71
+ For each score, write a **one-line rationale** explaining the scoring basis (FR12). Example:
72
+
73
+ > **#1: Add output examples for Noah agent** — R:5 I:1 C:70% E:2 = 1.8
74
+ > *Reach 5: affects users checking agent outputs. Impact 1: helpful but workarounds exist. Confidence 70%: pattern validated with other agents. Effort 2: single file addition.*
75
+
76
+ **Calibration check:** Mentally compare each proposed score against 2-3 existing backlog items at similar scale. If the score would rank the item significantly above or below where it "feels" relative to those items, revisit the component scores.
77
+
78
+ ### 3. Calculate Composite Scores and Sort
79
+
80
+ For each finding:
81
+ 1. Calculate composite: Score = (Reach x Impact x Confidence) / Effort
82
+ 2. Round to one decimal place
83
+ 3. Verify score falls within expected range (~0.0 to ~30.0; existing backlog ranges ~0.2 to ~10.0)
84
+
85
+ Sort the batch:
86
+ 1. **Primary:** Descending by composite score
87
+ 2. **Tiebreak 1:** Higher Confidence first
88
+ 3. **Tiebreak 2:** Newer insertion order first
89
+
90
+ ### 4. Present Scoring Batch (Gate 2)
91
+
92
+ Display the scored results:
93
+
94
+ > **Gate 2 — Review Proposed RICE Scores**
95
+ >
96
+ > **Scored findings: [N]**
97
+ >
98
+ > | # | Finding | R | I | C | E | Score | Rationale |
99
+ > |---|---------|---|---|---|---|-------|-----------|
100
+ > | 1 | [title] | 5 | 2 | 80% | 3 | 2.7 | [one-line rationale] |
101
+ > | 2 | [title] | 3 | 1 | 60% | 2 | 0.9 | [one-line rationale] |
102
+ > | 3 | [title] | 7 | 0.5 | 50% | 1 | 1.8 | [one-line rationale] |
103
+ >
104
+ > *Sorted by composite score (descending). Formula: (R x I x C) / E*
105
+
106
+ ### 5. Present GATE 2 MENU OPTIONS
107
+
108
+ Display:
109
+
110
+ > **Gate 2 — Adjust scores or finalize:**
111
+ >
112
+ > **Score adjustments** (by item number):
113
+ > - `#N R [value]` — Change Reach (1-10)
114
+ > - `#N I [value]` — Change Impact (0.25, 0.5, 1, 2, or 3)
115
+ > - `#N CF [value]` — Change Confidence (20-100%)
116
+ > - `#N E [value]` — Change Effort (1-10)
117
+ >
118
+ > **Batch editing:**
119
+ > - `D #N` — Drop item #N from the batch (will not be added to backlog)
120
+ >
121
+ > **[A] Advanced Elicitation** — Deeper analysis of scoring rationale
122
+ > **[P] Party Mode** — Multi-perspective scoring discussion
123
+ > **[C] Continue** — Finalize scores and proceed to backlog update
124
+
125
+ #### Menu Handling Logic:
126
+ - IF `#N R [value]`: Update Reach for item #N. Recalculate composite. Re-sort batch. Redisplay table and menu.
127
+ - IF `#N I [value]`: Update Impact for item #N. Recalculate composite. Re-sort batch. Redisplay table and menu.
128
+ - IF `#N CF [value]`: Update Confidence for item #N. Recalculate composite. Re-sort batch. Redisplay table and menu.
129
+ - IF `#N E [value]`: Update Effort for item #N. Recalculate composite. Re-sort batch. Redisplay table and menu.
130
+ - IF `D #N`: Remove item #N from the scoring batch. Redisplay table and menu.
131
+ - IF A: Execute {advancedElicitationTask} for deeper scoring analysis, and when finished redisplay the menu.
132
+ - IF P: Execute {partyModeWorkflow} for multi-perspective scoring discussion, and when finished redisplay the menu.
133
+ - IF C: Finalize the scored batch. Load, read the entire file, and execute `{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/steps-t/step-t-04-update.md`
134
+ - IF any other input: Display "Unknown command. Use `#N R/I/CF/E [value]`, `D #N`, **A**, **P**, or **C** to continue." then redisplay menu.
135
+
136
+ #### EXECUTION RULES:
137
+ - ALWAYS halt and wait for user input after presenting the menu
138
+ - After EVERY score adjustment, recalculate composite, re-sort, and redisplay the full table AND the menu
139
+ - The user may make multiple adjustments before pressing C
140
+ - ONLY proceed to step-t-04 when user selects 'C'
141
+ - After A or P execution, return to this menu
142
+ - Do NOT auto-continue — the user must explicitly approve the scores
143
+
144
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
145
+ ### ✅ SUCCESS: All findings scored with calibrated RICE components and rationale, composites calculated correctly, batch sorted by score, user validated at Gate 2, finalized scores passed to step-t-04
146
+ ### ❌ SYSTEM FAILURE: Scores proposed without rationale, composite formula wrong, scores outside valid ranges, user not given Gate 2 validation, findings written to backlog prematurely
147
+ **Master Rule:** Skipping steps is FORBIDDEN.
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: 'step-t-04-update'
3
+ description: 'Validate backlog structure, append scored items safely, regenerate prioritized view, and present completion summary'
4
+ outputFile: '{planning_artifacts}/initiatives-backlog.md'
5
+ templateFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/templates/backlog-format-spec.md'
6
+ workflowFile: '{project-root}/_bmad/bme/_enhance/workflows/initiatives-backlog/workflow.md'
7
+ ---
8
+
9
+ # Step 4: Backlog Update, Safety & Completion
10
+
11
+ ## STEP GOAL:
12
+
13
+ Validate backlog structure, safely append scored items from Gate 2, regenerate the prioritized view, and present a completion summary before returning to the T/R/C menu.
14
+
15
+ ## MANDATORY EXECUTION RULES (READ FIRST):
16
+
17
+ ### Universal Rules:
18
+ - 🛑 NEVER generate content without user input at validation mismatch prompt
19
+ - 📖 CRITICAL: Read this complete step file before taking action
20
+ - 🔄 CRITICAL: When returning to menu, read the entire workflow file
21
+ - 📋 YOU ARE A BACKLOG OPERATIONS SPECIALIST performing safe, structured writes
22
+
23
+ ### Role Reinforcement:
24
+ - ✅ You are a **backlog operations specialist** — precise, non-destructive, append-only
25
+ - ✅ Preserve all existing content — never delete, overwrite, or reorder existing rows
26
+ - ✅ The Prioritized View is the ONLY section regenerated from scratch
27
+ - ✅ All output must be standard markdown — no HTML, no proprietary syntax
28
+
29
+ ### Step-Specific Rules:
30
+ - 🎯 Focus on validation, safe writes, and completion reporting
31
+ - 🚫 FORBIDDEN to delete or reorder existing backlog items (FR18, NFR1)
32
+ - 🚫 FORBIDDEN to re-score items (scoring was finalized at Gate 2)
33
+ - 🚫 FORBIDDEN to modify step-t-01, step-t-02, or step-t-03
34
+ - 💬 Approach: validate first, write safely, summarize clearly
35
+
36
+ ## EXECUTION PROTOCOLS:
37
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
38
+ - 📖 Load `{templateFile}` (backlog-format-spec.md) for structural validation rules and table formats
39
+ - 💾 Write to `{outputFile}` only after validation passes (or user overrides)
40
+
41
+ ## CONTEXT BOUNDARIES:
42
+ - Available context: Scored findings from Gate 2, existing backlog file, backlog format spec template
43
+ - Focus: Structural validation, safe append, prioritized view regeneration, completion summary
44
+ - Limits: Do NOT re-score, re-extract, or re-classify items
45
+ - Dependencies: step-t-03-score.md (scored findings from Gate 2)
46
+
47
+ ## MANDATORY SEQUENCE
48
+
49
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
50
+
51
+ ### 1. Pre-Write Validation
52
+
53
+ Load `{outputFile}` (existing backlog) and validate structural integrity:
54
+
55
+ 1. **Section heading anchors** — All 7 required H2 sections exist in correct order:
56
+ - `## RICE Scoring Guide`
57
+ - `## Backlog`
58
+ - `## Exploration Candidates`
59
+ - `## Epic Groupings`
60
+ - `## Prioritized View (by RICE Score)`
61
+ - `## Completed`
62
+ - `## Change Log`
63
+ 2. **Prioritized view table** — Has exactly 6 columns (Rank, #, Initiative, Score, Track, Category)
64
+ 3. **Category tables** — Each table under `## Backlog` has exactly 10 columns (#, Initiative, Source, R, I, C, E, Score, Track, Status)
65
+ 4. **Change Log section** — The `## Change Log` H2 section exists with a table
66
+
67
+ If ALL checks pass, proceed directly to step 3 (Append Items).
68
+
69
+ ### 2. Mismatch Handling
70
+
71
+ If ANY validation check fails, present the specific mismatch(es):
72
+
73
+ > **Pre-Write Validation — Structural Mismatch Detected**
74
+ >
75
+ > [List each failed check with details]
76
+ >
77
+ > **[Y] Yes, proceed anyway**
78
+ > **[X] Abort and return to menu**
79
+
80
+ **ALWAYS halt and wait for user input.**
81
+
82
+ - IF Y: Continue to step 3 (Append Items)
83
+ - IF X: Display "Aborting backlog update." then load, read the entire file, and execute `{workflowFile}` to return to mode selection
84
+ - IF any other input: Display "Please select **Y** or **X**." then redisplay the prompt
85
+
86
+ ### 3. Append Items
87
+
88
+ For each scored item from Gate 2:
89
+
90
+ 1. **Find target category** — Locate the H3 section under `## Backlog` matching the item's category
91
+ 2. **Create category if needed** — If category doesn't exist, add a new H3 heading with a 10-column table at the end of `## Backlog` (before `## Exploration Candidates`)
92
+ 3. **Generate item ID** — Use category prefix letter (D/U/T/I/A/P) + next number (increment from highest existing in that category)
93
+ 4. **Append row** — Add new row to end of category table. NEVER delete, overwrite, or reorder existing rows
94
+ 5. **Add provenance** — Include in the Initiative description: `Added from [source], [date]` where source is the input origin from step-t-01 and date is the current session date
95
+
96
+ **Column format** (10 columns per backlog-format-spec.md):
97
+ ```
98
+ | [ID] | **[Title]** — [description]. Added from [source], [date] | [source ref] | [R] | [I] | [C]% | [E] | [score] | [track] | Backlog |
99
+ ```
100
+
101
+ **Important:** Triage Gate 2 adjustments are the initial score — no rescore provenance is generated.
102
+
103
+ ### 4. Regenerate Prioritized View
104
+
105
+ Rebuild the `## Prioritized View (by RICE Score)` table from scratch:
106
+
107
+ 1. Collect ALL active items from all category tables (existing + newly appended)
108
+ 2. Exclude items with Status "Done" or items in the `## Completed` section
109
+ 3. Sort by composite RICE score descending
110
+ 4. Tiebreak: (1) Higher Confidence first, (2) Newer insertion order first
111
+ 5. Generate sequential rank numbers starting at 1
112
+
113
+ Table format (6 columns):
114
+ ```
115
+ | Rank | # | Initiative | Score | Track | Category |
116
+ |------|---|-----------|-------|-------|----------|
117
+ ```
118
+
119
+ ### 5. Add Changelog Entry
120
+
121
+ Prepend a new row to the `## Change Log` table (newest first):
122
+
123
+ ```
124
+ | YYYY-MM-DD | Triage: Added [N] items ([categories affected]). [Any merge notes if applicable] |
125
+ ```
126
+
127
+ ### 6. Update Last Updated Date
128
+
129
+ Set the metadata header `Last Updated` field to the current date (YYYY-MM-DD format).
130
+
131
+ ### 7. Completion Summary & Return to Menu
132
+
133
+ After successful write, display:
134
+
135
+ > **Triage Complete**
136
+ >
137
+ > **Items added:** [N]
138
+ > **Items merged:** [N] (absorbed into existing items at Gate 1)
139
+ > **Categories affected:** [list]
140
+ >
141
+ > **New Top 3 Positions:**
142
+ > 1. [#ID] [title] — Score: [X.X]
143
+ > 2. [#ID] [title] — Score: [X.X]
144
+ > 3. [#ID] [title] — Score: [X.X]
145
+
146
+ Then return to the T/R/C menu:
147
+
148
+ > Loading `{workflowFile}` to return to mode selection...
149
+
150
+ Load, read the entire file, and execute `{workflowFile}`.
151
+
152
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
153
+ ### ✅ SUCCESS: Pre-write validation performed, existing content preserved, items appended with correct IDs and provenance, prioritized view regenerated with all items sorted correctly, changelog updated, completion summary displayed with top 3, T/R/C menu re-presented
154
+ ### ❌ SYSTEM FAILURE: Existing backlog content deleted/overwritten/reordered, items written without validation, wrong IDs or missing provenance, prioritized view not regenerated, no completion summary, no return to menu
155
+ **Master Rule:** Skipping steps is FORBIDDEN.