convoke-agents 2.4.0 → 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 (67) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/INSTALLATION.md +109 -86
  3. package/README.md +220 -163
  4. package/UPDATE-GUIDE.md +63 -23
  5. package/_bmad/bme/_gyre/README.md +100 -0
  6. package/_bmad/bme/_gyre/agents/.gitkeep +0 -0
  7. package/_bmad/bme/_gyre/agents/model-curator.md +128 -0
  8. package/_bmad/bme/_gyre/agents/readiness-analyst.md +127 -0
  9. package/_bmad/bme/_gyre/agents/review-coach.md +130 -0
  10. package/_bmad/bme/_gyre/agents/stack-detective.md +125 -0
  11. package/_bmad/bme/_gyre/compass-routing-reference.md +168 -0
  12. package/_bmad/bme/_gyre/config.yaml +22 -0
  13. package/_bmad/bme/_gyre/contracts/.gitkeep +0 -0
  14. package/_bmad/bme/_gyre/contracts/gc1-stack-profile.md +152 -0
  15. package/_bmad/bme/_gyre/contracts/gc2-capabilities-manifest.md +189 -0
  16. package/_bmad/bme/_gyre/contracts/gc3-findings-report.md +197 -0
  17. package/_bmad/bme/_gyre/contracts/gc4-feedback-loop.md +209 -0
  18. package/_bmad/bme/_gyre/guides/ATLAS-USER-GUIDE.md +177 -0
  19. package/_bmad/bme/_gyre/guides/COACH-USER-GUIDE.md +172 -0
  20. package/_bmad/bme/_gyre/guides/LENS-USER-GUIDE.md +181 -0
  21. package/_bmad/bme/_gyre/guides/SCOUT-USER-GUIDE.md +158 -0
  22. package/_bmad/bme/_gyre/workflows/.gitkeep +0 -0
  23. package/_bmad/bme/_gyre/workflows/accuracy-validation/steps/step-01-select-repos.md +55 -0
  24. package/_bmad/bme/_gyre/workflows/accuracy-validation/steps/step-02-run-validation.md +78 -0
  25. package/_bmad/bme/_gyre/workflows/accuracy-validation/steps/step-03-score-results.md +143 -0
  26. package/_bmad/bme/_gyre/workflows/accuracy-validation/workflow.md +41 -0
  27. package/_bmad/bme/_gyre/workflows/delta-report/steps/step-01-load-history.md +63 -0
  28. package/_bmad/bme/_gyre/workflows/delta-report/steps/step-02-compute-delta.md +72 -0
  29. package/_bmad/bme/_gyre/workflows/delta-report/steps/step-03-present-delta.md +143 -0
  30. package/_bmad/bme/_gyre/workflows/delta-report/workflow.md +34 -0
  31. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-01-initialize.md +68 -0
  32. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-02-detect-stack.md +49 -0
  33. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-03-generate-model.md +52 -0
  34. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-04-analyze-gaps.md +42 -0
  35. package/_bmad/bme/_gyre/workflows/full-analysis/steps/step-05-review-findings.md +128 -0
  36. package/_bmad/bme/_gyre/workflows/full-analysis/workflow.md +39 -0
  37. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-01-load-manifest.md +70 -0
  38. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-02-observability-analysis.md +110 -0
  39. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-03-deployment-analysis.md +87 -0
  40. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-04-cross-domain-correlation.md +105 -0
  41. package/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-05-present-findings.md +172 -0
  42. package/_bmad/bme/_gyre/workflows/gap-analysis/workflow.md +38 -0
  43. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-01-load-profile.md +74 -0
  44. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-02-generate-capabilities.md +116 -0
  45. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-03-web-enrichment.md +89 -0
  46. package/_bmad/bme/_gyre/workflows/model-generation/steps/step-04-write-manifest.md +122 -0
  47. package/_bmad/bme/_gyre/workflows/model-generation/workflow.md +40 -0
  48. package/_bmad/bme/_gyre/workflows/model-review/steps/step-01-load-context.md +86 -0
  49. package/_bmad/bme/_gyre/workflows/model-review/steps/step-02-walkthrough.md +116 -0
  50. package/_bmad/bme/_gyre/workflows/model-review/steps/step-03-apply-amendments.md +92 -0
  51. package/_bmad/bme/_gyre/workflows/model-review/steps/step-04-capture-feedback.md +107 -0
  52. package/_bmad/bme/_gyre/workflows/model-review/steps/step-05-summary.md +60 -0
  53. package/_bmad/bme/_gyre/workflows/model-review/workflow.md +41 -0
  54. package/_bmad/bme/_gyre/workflows/stack-detection/steps/step-01-scan-filesystem.md +176 -0
  55. package/_bmad/bme/_gyre/workflows/stack-detection/steps/step-02-classify-stack.md +111 -0
  56. package/_bmad/bme/_gyre/workflows/stack-detection/steps/step-03-guard-questions.md +117 -0
  57. package/_bmad/bme/_gyre/workflows/stack-detection/workflow.md +42 -0
  58. package/_bmad/bme/_vortex/config.yaml +1 -1
  59. package/package.json +6 -2
  60. package/scripts/archive.js +304 -0
  61. package/scripts/convoke-doctor.js +146 -132
  62. package/scripts/docs-audit.js +21 -5
  63. package/scripts/install-gyre-agents.js +140 -0
  64. package/scripts/install-vortex-agents.js +0 -0
  65. package/scripts/update/lib/agent-registry.js +70 -0
  66. package/scripts/update/lib/refresh-installation.js +152 -30
  67. package/scripts/update/lib/validator.js +160 -1
@@ -0,0 +1,49 @@
1
+ ---
2
+ step: 2
3
+ workflow: full-analysis
4
+ title: Detect Stack
5
+ ---
6
+
7
+ # Step 2: Detect Stack
8
+
9
+ Run the stack-detection workflow inline. This step delegates to the stack-detection workflow steps for the actual scanning, classification, and guard questions.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - Execute the stack-detection workflow steps sequentially (scan → classify → guard questions)
14
+ - Write GC1 (Stack Profile) to `.gyre/stack-profile.yaml` on completion
15
+ - If GC1 already exists and mode is **Anticipation**, ask the user: "Your stack was detected previously. Re-detect or keep existing? (re-detect / keep)"
16
+
17
+ ## EXECUTION
18
+
19
+ ### If Crisis or Regeneration Mode
20
+
21
+ Execute the stack-detection workflow steps in sequence:
22
+
23
+ 1. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/stack-detection/steps/step-01-scan-filesystem.md`
24
+ 2. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/stack-detection/steps/step-02-classify-stack.md`
25
+ 3. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/stack-detection/steps/step-03-guard-questions.md`
26
+
27
+ After user confirms the classification, write GC1 to `.gyre/stack-profile.yaml`.
28
+
29
+ ### If Anticipation Mode (GC1 exists)
30
+
31
+ Present the existing stack profile summary and ask:
32
+
33
+ ```
34
+ Your stack was previously detected as: [archetype summary from GC1]
35
+
36
+ Would you like to:
37
+ a) Keep this detection and continue to model generation
38
+ b) Re-detect (your project may have changed)
39
+ ```
40
+
41
+ If user chooses (b), run the detection steps above.
42
+
43
+ ---
44
+
45
+ ## NEXT STEP
46
+
47
+ With GC1 written, proceed to model generation:
48
+
49
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/full-analysis/steps/step-03-generate-model.md
@@ -0,0 +1,52 @@
1
+ ---
2
+ step: 3
3
+ workflow: full-analysis
4
+ title: Generate Model
5
+ ---
6
+
7
+ # Step 3: Generate Model
8
+
9
+ Run the model-generation workflow inline. Atlas generates a capabilities manifest contextual to the detected stack.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - GC1 (Stack Profile) must have been written in step 2 — if missing, STOP
14
+ - If cached model exists and mode is **Anticipation**, load cached and skip generation
15
+ - If mode is **Regeneration** or **Crisis**, run full model generation
16
+ - Execute the model-generation workflow steps sequentially
17
+
18
+ ## EXECUTION
19
+
20
+ ### If Anticipation Mode (capabilities.yaml exists)
21
+
22
+ Present the existing model summary:
23
+
24
+ ```
25
+ Your capabilities model was previously generated: [N] capabilities for [stack summary].
26
+
27
+ Would you like to:
28
+ a) Keep this model and continue to gap analysis
29
+ b) Regenerate (fresh model even with existing amendments)
30
+ ```
31
+
32
+ If user chooses (a), skip to next step.
33
+ If user chooses (b), proceed with generation below.
34
+
35
+ ### If Crisis or Regeneration Mode
36
+
37
+ Execute the model-generation workflow steps in sequence:
38
+
39
+ 1. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/model-generation/steps/step-01-load-profile.md`
40
+ 2. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/model-generation/steps/step-02-generate-capabilities.md`
41
+ 3. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/model-generation/steps/step-03-web-enrichment.md`
42
+ 4. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/model-generation/steps/step-04-write-manifest.md`
43
+
44
+ After completion, GC2 is written to `.gyre/capabilities.yaml`.
45
+
46
+ ---
47
+
48
+ ## NEXT STEP
49
+
50
+ With GC2 written, proceed to gap analysis:
51
+
52
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/full-analysis/steps/step-04-analyze-gaps.md
@@ -0,0 +1,42 @@
1
+ ---
2
+ step: 4
3
+ workflow: full-analysis
4
+ title: Analyze Gaps
5
+ ---
6
+
7
+ # Step 4: Analyze Gaps
8
+
9
+ Run the gap-analysis workflow inline. Lens compares each capability against filesystem evidence.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - GC2 (Capabilities Manifest) must have been written in step 3 — if missing, STOP
14
+ - Execute the gap-analysis workflow steps sequentially
15
+ - Time target: first finding presented <2 minutes from workflow start (NFR1)
16
+
17
+ ## EXECUTION
18
+
19
+ Execute the gap-analysis workflow steps in sequence:
20
+
21
+ 1. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-01-load-manifest.md`
22
+ 2. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-02-observability-analysis.md`
23
+ 3. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-03-deployment-analysis.md`
24
+ 4. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-04-cross-domain-correlation.md`
25
+ 5. Load and execute: `{project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-05-present-findings.md`
26
+
27
+ After completion, GC3 is written to `.gyre/findings.yaml`.
28
+
29
+ ## ERROR RECOVERY
30
+
31
+ If a domain analysis fails:
32
+ - GC2 (capabilities.yaml) is already safe — it was written in step 3
33
+ - Report what was found so far
34
+ - Offer to retry the failed domain or continue with partial results
35
+
36
+ ---
37
+
38
+ ## NEXT STEP
39
+
40
+ With GC3 written, proceed to findings review:
41
+
42
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/full-analysis/steps/step-05-review-findings.md
@@ -0,0 +1,128 @@
1
+ ---
2
+ step: 5
3
+ workflow: full-analysis
4
+ title: Review Findings
5
+ implements: Epic 4 (Stories 4.5, 4.7)
6
+ ---
7
+
8
+ # Step 5: Review Findings
9
+
10
+ Coach presents findings and offers review options. This is the final step of the full-analysis pipeline.
11
+
12
+ ## MANDATORY EXECUTION RULES
13
+
14
+ - GC3 (Findings Report) must have been written in step 4 — if missing, STOP
15
+ - Present a brief findings summary (severity counts from GC3)
16
+ - Prompt user to review capabilities manifest (FR43)
17
+ - Offer: "Walk through now" / "Later" (deferred flag) / "Skip" (FR55)
18
+ - If user chooses review: execute the model-review workflow inline
19
+ - End with full Gyre compass routing table (NFR18 — all 7 workflows independently runnable)
20
+
21
+ ## EXECUTION
22
+
23
+ ### 1. Verify GC3 Exists
24
+
25
+ Check that `.gyre/findings.yaml` was written by step 4. If missing:
26
+
27
+ ```
28
+ ❌ Findings report not found at .gyre/findings.yaml
29
+
30
+ Step 4 (gap analysis) may not have completed. Options:
31
+ a) Re-run gap analysis
32
+ b) Exit full-analysis and investigate
33
+ ```
34
+
35
+ ### 2. Display Findings Summary
36
+
37
+ Load GC3 and present a brief summary (not the full presentation — that was done in step 4):
38
+
39
+ ```
40
+ ## Analysis Complete
41
+
42
+ Your findings report has been written to `.gyre/findings.yaml`:
43
+
44
+ | Severity | Count |
45
+ |----------|:-----:|
46
+ | 🔴 Blockers | [N] |
47
+ | 🟡 Recommended | [N] |
48
+ | 🟢 Nice-to-have | [N] |
49
+ | **Total** | **[N]** |
50
+ ```
51
+
52
+ ### 3. Check for Existing Feedback (FR53)
53
+
54
+ If `.gyre/feedback.yaml` exists with entries:
55
+
56
+ ```
57
+ 💡 Your team has [N] previous feedback entries that can inform your review.
58
+ ```
59
+
60
+ ### 4. Review Prompt (FR43, FR55)
61
+
62
+ ```
63
+ ### Would you like to review your capabilities model?
64
+
65
+ Coach can walk you through your capabilities one by one — keep, remove, edit, or add.
66
+ This helps customize the model to your specific stack.
67
+
68
+ 1. **Walk through now** — Review capabilities interactively
69
+ 2. **Later** — Save a reminder for next run
70
+ 3. **Skip** — Go straight to feedback and finish
71
+
72
+ What would you prefer?
73
+ ```
74
+
75
+ ### 5. Handle Response
76
+
77
+ **Walk through now:**
78
+ Execute the model-review workflow steps inline:
79
+ 1. Load step: `{project-root}/_bmad/bme/_gyre/workflows/model-review/steps/step-02-walkthrough.md`
80
+ 2. Load step: `{project-root}/_bmad/bme/_gyre/workflows/model-review/steps/step-03-apply-amendments.md`
81
+ 3. Load step: `{project-root}/_bmad/bme/_gyre/workflows/model-review/steps/step-04-capture-feedback.md`
82
+
83
+ **Later:**
84
+ Set `review_deferred: true` in `.gyre/capabilities.yaml` frontmatter.
85
+ ```
86
+ ✓ Review deferred. Coach will remind you next time you run an analysis.
87
+ ```
88
+ Then proceed to feedback capture:
89
+ Load step: `{project-root}/_bmad/bme/_gyre/workflows/model-review/steps/step-04-capture-feedback.md`
90
+
91
+ **Skip:**
92
+ Proceed directly to feedback capture:
93
+ Load step: `{project-root}/_bmad/bme/_gyre/workflows/model-review/steps/step-04-capture-feedback.md`
94
+
95
+ ### 6. Full-Analysis Complete — Gyre Compass
96
+
97
+ After review/feedback is done, present the final compass:
98
+
99
+ ```
100
+ ---
101
+
102
+ ## Full Analysis Complete 🎯
103
+
104
+ All 5 steps finished. Your Gyre artifacts:
105
+ - `.gyre/stack-profile.yaml` — Stack Profile (GC1)
106
+ - `.gyre/capabilities.yaml` — Capabilities Manifest (GC2)
107
+ - `.gyre/findings.yaml` — Findings Report (GC3)
108
+ - `.gyre/feedback.yaml` — Feedback Loop (GC4) [if feedback was captured]
109
+
110
+ 💡 **Tip:** Commit the `.gyre/` directory to share these artifacts with your team.
111
+
112
+ ---
113
+
114
+ ## What's Next?
115
+
116
+ | If you want to... | Consider next... | Agent | Why |
117
+ |---|---|---|---|
118
+ | Detect or re-detect your stack | stack-detection | Scout 🔎 | New project or stack has changed |
119
+ | Generate or regenerate the model | model-generation | Atlas 📐 | First run or want fresh model |
120
+ | Review your capabilities manifest | model-review | Coach 🏋️ | Customize the model to your stack |
121
+ | Run gap analysis | gap-analysis | Lens 🔬 | Find what's missing |
122
+ | See what changed since last run | delta-report | Lens 🔬 | Track progress over time |
123
+ | Run the full pipeline again | full-analysis | Scout 🔎 | Complete end-to-end analysis |
124
+ | Validate model accuracy | accuracy-validation | Atlas 📐 | Pre-pilot quality gate |
125
+ | **Findings impact product discovery** | **Vortex agents** | **Emma 🎯 / Isla 🔍** | Production readiness gaps may inform discovery |
126
+
127
+ > **Note:** These are recommendations. You can run any Gyre workflow at any time.
128
+ ```
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: full-analysis
3
+ agent: stack-detective
4
+ title: Full Gyre Analysis
5
+ description: Orchestrates the complete analysis pipeline — detect stack, generate model, analyze gaps, review findings
6
+ steps: 5
7
+ ---
8
+
9
+ # Full Analysis Workflow
10
+
11
+ Runs the complete Gyre pipeline end-to-end: **Detect → Model → Analyze → Review**.
12
+
13
+ ## Pipeline
14
+
15
+ | Step | File | Agent | Action |
16
+ |------|------|-------|--------|
17
+ | 1 | step-01-initialize.md | Scout 🔎 | Check for `.gyre/`, detect mode (crisis/anticipation/regeneration), create `.gyre/` if needed |
18
+ | 2 | step-02-detect-stack.md | Scout 🔎 | Run stack detection, ask guard questions, write GC1 |
19
+ | 3 | step-03-generate-model.md | Atlas 📐 | Load GC1, generate capabilities, write GC2 (skip if cached in anticipation mode) |
20
+ | 4 | step-04-analyze-gaps.md | Lens 🔬 | Load GC2, run absence detection + cross-domain correlation, write GC3 |
21
+ | 5 | step-05-review-findings.md | Coach 🏋️ | Load GC3, present findings, guide review, capture feedback, write GC4 |
22
+
23
+ ## Mode Detection
24
+
25
+ - `.gyre/` does **not** exist → **crisis mode** (first run — full pipeline)
26
+ - `.gyre/capabilities.yaml` exists → **anticipation mode** (re-run — skip model generation, use cached)
27
+ - User says "regenerate" → **regeneration mode** (fresh model generation even with existing cache)
28
+
29
+ ## Privacy Boundary
30
+
31
+ The GC1 contract enforces a privacy boundary: only technology categories flow between agents — never file contents, paths, version numbers, or secrets.
32
+
33
+ ## Instructions
34
+
35
+ Load the first step to begin:
36
+
37
+ ```
38
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/full-analysis/steps/step-01-initialize.md
39
+ ```
@@ -0,0 +1,70 @@
1
+ ---
2
+ step: 1
3
+ workflow: gap-analysis
4
+ title: Load Capabilities Manifest
5
+ ---
6
+
7
+ # Step 1: Load Capabilities Manifest
8
+
9
+ Load the GC2 Capabilities Manifest and prepare for domain analysis.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - Use Claude Code Read tool to load `.gyre/capabilities.yaml`
14
+ - If file doesn't exist, do NOT proceed — inform user to run model-generation first
15
+ - Filter out removed capabilities (removed: true) — they are excluded from analysis
16
+ - Group remaining capabilities by category for domain-specific analysis
17
+
18
+ ## EXECUTION SEQUENCE
19
+
20
+ ### 1. Load GC2 (Capabilities Manifest)
21
+
22
+ **Read** `.gyre/capabilities.yaml`:
23
+
24
+ - Parse the YAML content
25
+ - Verify it has GC2 contract frontmatter
26
+ - Extract: version, stack_summary, capability_count, limited_coverage, capabilities array
27
+
28
+ **If file not found:**
29
+ ```
30
+ I need a Capabilities Manifest (GC2) before I can analyze gaps.
31
+
32
+ Please run Atlas's model generation first:
33
+ - Activate Atlas: /bmad-agent-bme-model-curator
34
+ - Select [GM] Generate Model
35
+
36
+ Or run the full analysis pipeline:
37
+ - Select [FA] Full Analysis
38
+ ```
39
+ Then STOP — do not proceed.
40
+
41
+ ### 2. Filter and Group Capabilities
42
+
43
+ - Remove capabilities with `removed: true` from the analysis set
44
+ - Group by category:
45
+ - **Observability:** capabilities with category "observability"
46
+ - **Deployment:** capabilities with category "deployment"
47
+ - **Reliability:** capabilities with category "reliability" (analyzed with deployment domain)
48
+ - **Security:** capabilities with category "security" (analyzed with deployment domain)
49
+
50
+ ### 3. Present Analysis Plan
51
+
52
+ ```
53
+ ## Capabilities Manifest Loaded
54
+
55
+ **Stack:** [stack_summary]
56
+ **Total capabilities:** [capability_count] ([N] active, [M] removed by user)
57
+ **Limited coverage:** [yes/no]
58
+
59
+ **Analysis plan:**
60
+ - Observability domain: [N] capabilities to check
61
+ - Deployment domain: [N] capabilities to check (includes reliability + security)
62
+
63
+ Starting observability analysis...
64
+ ```
65
+
66
+ ---
67
+
68
+ ## NEXT STEP
69
+
70
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-02-observability-analysis.md
@@ -0,0 +1,110 @@
1
+ ---
2
+ step: 2
3
+ workflow: gap-analysis
4
+ title: Observability Analysis
5
+ ---
6
+
7
+ # Step 2: Observability Analysis
8
+
9
+ For each observability capability, search the filesystem for implementation evidence.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - Use Claude Code tools (Glob, Grep, Read) — do NOT ask the user for this information
14
+ - Search for EVIDENCE OF EXISTENCE, not quality — absence detection, not code review
15
+ - Every finding must cite a detection method (what tool was used and what was searched)
16
+ - Do NOT include file contents in findings — only categorical evidence descriptions
17
+ - Tag every finding with source, confidence, and severity
18
+
19
+ ## ANALYSIS PATTERN
20
+
21
+ For each observability capability in the manifest:
22
+
23
+ ### 1. Evidence Search
24
+
25
+ Use a progressive search strategy:
26
+
27
+ **Glob** — find relevant files:
28
+ - Config files (e.g., `**/otel*.yaml`, `**/prometheus*.yml`, `**/*logging*.*`)
29
+ - Source patterns (e.g., `**/*health*.*`, `**/*metrics*.*`, `**/*trace*.*`)
30
+ - Package configs that declare observability dependencies
31
+
32
+ **Grep** — search for implementation patterns:
33
+ - Import statements (e.g., `opentelemetry`, `prom-client`, `winston`, `pino`)
34
+ - Configuration patterns (e.g., `healthz`, `readiness`, `liveness`)
35
+ - Metric registration (e.g., `histogram`, `counter`, `gauge`)
36
+
37
+ **Read** — examine found files for completeness:
38
+ - If a config file exists, is it configured or just a skeleton?
39
+ - If an import exists, is it used or just declared?
40
+
41
+ ### 2. Capability-Specific Search Patterns
42
+
43
+ | Capability Pattern | Glob For | Grep For |
44
+ |-------------------|----------|----------|
45
+ | Structured logging | `**/*log*config*`, `**/*logger*.*` | `winston`, `pino`, `bunyan`, `structured`, `json.*log` |
46
+ | Distributed tracing | `**/*trace*.*`, `**/*otel*.*` | `opentelemetry`, `@opentelemetry`, `trace`, `span` |
47
+ | Metrics collection | `**/*metric*.*`, `**/*prom*.*` | `prometheus`, `prom-client`, `histogram`, `counter` |
48
+ | Health checks | `**/*health*.*`, `**/readiness*`, `**/liveness*` | `healthz`, `readiness`, `liveness`, `/health` |
49
+ | Alerting | `**/*alert*.*`, `**/*alarm*.*` | `alertmanager`, `cloudwatch.*alarm`, `pagerduty` |
50
+ | Error tracking | `**/*sentry*.*`, `**/*error*track*` | `sentry`, `@sentry`, `errorHandler`, `Bugsnag` |
51
+
52
+ ### 3. Finding Classification
53
+
54
+ For each capability, classify the result:
55
+
56
+ | Status | Criteria | Finding Generated? |
57
+ |--------|----------|:-----------------:|
58
+ | **Present** | Multiple evidence sources confirm implementation | No (not a gap) |
59
+ | **Absent** | No evidence found across all search patterns | Yes — finding |
60
+ | **Partial** | Config or dependency exists but implementation incomplete | Yes — finding |
61
+
62
+ ### 4. Finding Tagging
63
+
64
+ Each finding must include:
65
+
66
+ ```yaml
67
+ - id: "OBS-NNN" # sequential within observability domain
68
+ domain: "observability"
69
+ severity: "[blocker|recommended|nice-to-have]"
70
+ source: "[static-analysis|contextual-model]"
71
+ confidence: "[high|medium|low]"
72
+ capability_ref: "[GC2 capability ID]"
73
+ description: "[what's missing and why it matters]"
74
+ evidence_summary: "[what was searched and what was/wasn't found]"
75
+ severity_rationale: "[why this severity level]"
76
+ ```
77
+
78
+ **Source tagging:**
79
+ - `static-analysis`: Finding based on actual filesystem evidence (file found/not found, pattern matched/not matched)
80
+ - `contextual-model`: Finding inferred from the capabilities manifest — the capability is relevant but no specific search pattern exists
81
+
82
+ **Severity guidelines:**
83
+ - `blocker`: Missing capability that prevents safe production deployment (e.g., no health checks on K8s)
84
+ - `recommended`: Missing capability that significantly reduces operational visibility or safety
85
+ - `nice-to-have`: Missing capability that would improve operations but isn't critical
86
+
87
+ **Confidence levels:**
88
+ - `high`: Multiple search patterns confirm absence — confident the capability doesn't exist
89
+ - `medium`: Some patterns checked, some missed — moderately confident
90
+ - `low`: Limited search coverage or ambiguous results — low confidence
91
+
92
+ ## OUTPUT
93
+
94
+ Store observability findings in working memory. Present brief progress:
95
+
96
+ ```
97
+ Observability analysis complete:
98
+ - [N] capabilities checked
99
+ - [P] present (no gaps)
100
+ - [A] absent (gaps found)
101
+ - [R] partial (incomplete implementation)
102
+
103
+ Proceeding to deployment analysis...
104
+ ```
105
+
106
+ ---
107
+
108
+ ## NEXT STEP
109
+
110
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-03-deployment-analysis.md
@@ -0,0 +1,87 @@
1
+ ---
2
+ step: 3
3
+ workflow: gap-analysis
4
+ title: Deployment Analysis
5
+ ---
6
+
7
+ # Step 3: Deployment Analysis
8
+
9
+ For each deployment, reliability, and security capability, search the filesystem for implementation evidence.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - Same rules as observability analysis: use tools, search for existence, cite methods, no file contents
14
+ - This step covers three GC2 categories: deployment, reliability, and security
15
+ - Finding IDs use prefix "DEP-" for all three categories in this domain
16
+
17
+ ## ANALYSIS PATTERN
18
+
19
+ Same progressive search strategy as Step 2, applied to deployment-related capabilities.
20
+
21
+ ### Capability-Specific Search Patterns
22
+
23
+ **Deployment:**
24
+
25
+ | Capability Pattern | Glob For | Grep For |
26
+ |-------------------|----------|----------|
27
+ | CI/CD pipeline | `.github/workflows/*`, `.gitlab-ci.yml`, `Jenkinsfile` | `deploy`, `release`, `publish`, `build` |
28
+ | Container config | `Dockerfile*`, `docker-compose*`, `*.dockerfile` | `HEALTHCHECK`, `EXPOSE`, `multi-stage` |
29
+ | K8s manifests | `k8s/**`, `manifests/**`, `helm/**` | `deployment`, `service`, `ingress`, `configmap` |
30
+ | Rollback strategy | `k8s/**`, `.github/workflows/*` | `rollback`, `revision`, `undo`, `canary`, `blue-green` |
31
+ | IaC | `terraform/**`, `*.tf`, `cloudformation/**`, `cdk.json` | `resource`, `module`, `stack` |
32
+ | Environment config | `**/.env*`, `**/config/**` | `environment`, `config`, `secret`, `env_var` |
33
+ | Deployment strategy | `k8s/**`, `.github/workflows/*` | `rollingUpdate`, `canary`, `blue-green`, `maxSurge` |
34
+
35
+ **Reliability:**
36
+
37
+ | Capability Pattern | Glob For | Grep For |
38
+ |-------------------|----------|----------|
39
+ | Graceful shutdown | `**/*shutdown*`, `**/*signal*` | `SIGTERM`, `SIGINT`, `graceful`, `drain` |
40
+ | Circuit breakers | `**/*circuit*`, `**/*retry*` | `circuit`, `breaker`, `retry`, `backoff`, `resilience` |
41
+ | Rate limiting | `**/*rate*limit*`, `**/*throttle*` | `rateLimit`, `throttle`, `rate_limit` |
42
+ | Dependency health | `**/*health*`, `**/*ping*` | `dependency.*check`, `upstream.*health`, `ping` |
43
+
44
+ **Security:**
45
+
46
+ | Capability Pattern | Glob For | Grep For |
47
+ |-------------------|----------|----------|
48
+ | Secrets management | `**/*secret*`, `**/*vault*` | `vault`, `secrets-manager`, `KMS`, `sealed-secret` |
49
+ | Vulnerability scanning | `.github/workflows/*`, `**/*security*` | `snyk`, `trivy`, `dependabot`, `renovate`, `audit` |
50
+ | Network policies | `k8s/**/*network*`, `**/*firewall*` | `NetworkPolicy`, `security-group`, `firewall` |
51
+ | Auth patterns | `**/*auth*`, `**/*jwt*`, `**/*oauth*` | `authentication`, `authorization`, `jwt`, `oauth`, `rbac` |
52
+ | Image scanning | `.github/workflows/*`, `**/*scan*` | `trivy`, `snyk container`, `docker.*scan`, `ecr.*scan` |
53
+
54
+ ### Finding Classification and Tagging
55
+
56
+ Same as observability analysis (Step 2):
57
+ - Classify: present / absent / partial
58
+ - Tag with: id (DEP-NNN), domain, severity, source, confidence, capability_ref, description, evidence_summary, severity_rationale
59
+ - Source: `static-analysis` or `contextual-model`
60
+
61
+ ### Severity Guidelines (Deployment Domain)
62
+
63
+ - `blocker`: Missing capability that creates deployment risk (e.g., no rollback mechanism, no graceful shutdown on K8s)
64
+ - `recommended`: Missing capability that reduces deployment safety or velocity (e.g., no canary strategy, no IaC)
65
+ - `nice-to-have`: Missing capability that would improve deployment hygiene (e.g., no image scanning, no network policies for non-sensitive service)
66
+
67
+ ## OUTPUT
68
+
69
+ Store deployment findings in working memory alongside observability findings. Present brief progress:
70
+
71
+ ```
72
+ Deployment analysis complete:
73
+ - [N] capabilities checked (deployment + reliability + security)
74
+ - [P] present (no gaps)
75
+ - [A] absent (gaps found)
76
+ - [R] partial (incomplete implementation)
77
+
78
+ **Combined findings so far:** [total] findings across both domains
79
+
80
+ Proceeding to cross-domain correlation...
81
+ ```
82
+
83
+ ---
84
+
85
+ ## NEXT STEP
86
+
87
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-04-cross-domain-correlation.md
@@ -0,0 +1,105 @@
1
+ ---
2
+ step: 4
3
+ workflow: gap-analysis
4
+ title: Cross-Domain Correlation
5
+ ---
6
+
7
+ # Step 4: Cross-Domain Correlation
8
+
9
+ Identify compound findings that span observability and deployment domains.
10
+
11
+ ## MANDATORY EXECUTION RULES
12
+
13
+ - Only run if BOTH domain analyses (steps 2 and 3) completed successfully
14
+ - If either domain failed, skip correlation and note in the report
15
+ - Each compound must reference exactly 2 existing findings from DIFFERENT domains
16
+ - Compound confidence = lower of the two component confidences
17
+ - Suppress compounds when either component has confidence "low" (NFR22)
18
+
19
+ ## CORRELATION PATTERNS
20
+
21
+ Look for these known amplification patterns between observability and deployment findings:
22
+
23
+ ### High-Priority Compounds
24
+
25
+ | Observability Finding | + Deployment Finding | = Compound Impact |
26
+ |----------------------|---------------------|-------------------|
27
+ | No health checks | No rollback mechanism | **Deployment risk amplifier:** Failed deployments cannot be detected or reversed automatically |
28
+ | No structured logging | No deployment event markers | **Incident blindness:** Cannot correlate deployment events with application behavior changes |
29
+ | No distributed tracing | No circuit breakers | **Cascade risk:** Service failures propagate without detection or isolation |
30
+ | No metrics collection | No alerting/monitoring | **Silent failure:** System degradation invisible until users report issues |
31
+ | No error tracking | No graceful shutdown | **Data loss risk:** Errors during shutdown go untracked, requests lost silently |
32
+
33
+ ### Medium-Priority Compounds
34
+
35
+ | Observability Finding | + Deployment Finding | = Compound Impact |
36
+ |----------------------|---------------------|-------------------|
37
+ | No tracing | No canary strategy | **Regression detection gap:** Cannot detect performance regressions during gradual rollout |
38
+ | No metrics | No autoscaling config | **Capacity blindness:** Cannot scale based on load if load isn't measured |
39
+ | No log correlation IDs | Multiple services detected | **Debug difficulty:** Cross-service issues untraceable without correlation |
40
+
41
+ ## COMPOUND FINDING SCHEMA
42
+
43
+ ```yaml
44
+ - id: "COMPOUND-NNN"
45
+ domain: "cross-domain"
46
+ severity: "[blocker|recommended|nice-to-have]"
47
+ source: "contextual-model"
48
+ confidence: "[lower of two components]"
49
+ capability_ref: ["[GC2 cap ID 1]", "[GC2 cap ID 2]"]
50
+ description: "[what the compound gap means]"
51
+ evidence_summary: "[references to component findings]"
52
+ related_findings: ["[OBS-NNN]", "[DEP-NNN]"]
53
+ combined_impact: "[reasoning chain: why these two gaps together are worse than either alone]"
54
+ ```
55
+
56
+ ## CORRELATION PROCESS
57
+
58
+ 1. For each observability finding, check if any deployment finding creates an amplification pattern
59
+ 2. For each match, verify:
60
+ - Both component findings are from different domains
61
+ - Neither component has confidence "low" (suppress if so)
62
+ - The combination genuinely amplifies risk (not just coincidental co-occurrence)
63
+ 3. Assign compound severity based on combined impact (may be higher than either component)
64
+ 4. Write reasoning chain explaining WHY these two gaps together are worse
65
+
66
+ ## SANITY CHECK
67
+
68
+ After correlation, run a sanity check:
69
+
70
+ ```yaml
71
+ sanity_check:
72
+ passed: boolean
73
+ warnings: []
74
+ ```
75
+
76
+ Flag warnings for:
77
+ - **>80% of capabilities flagged missing** — may indicate wrong archetype or insufficient detection
78
+ - **>5 compounds generated** — may indicate over-correlation (review each for genuine amplification)
79
+ - **All findings from one domain only** — correlation was skipped or one domain had no findings
80
+
81
+ ## OUTPUT
82
+
83
+ Store compound findings alongside domain findings. Present brief progress:
84
+
85
+ ```
86
+ Cross-domain correlation complete:
87
+ - [N] amplification patterns checked
88
+ - [M] compound findings identified
89
+
90
+ [If compounds found]:
91
+ Notable compounds:
92
+ - [COMPOUND-001]: [brief description]
93
+ - [COMPOUND-002]: [brief description]
94
+
95
+ [If no compounds]:
96
+ No cross-domain amplification patterns detected — your gaps are independent.
97
+
98
+ Preparing findings report...
99
+ ```
100
+
101
+ ---
102
+
103
+ ## NEXT STEP
104
+
105
+ Load step: {project-root}/_bmad/bme/_gyre/workflows/gap-analysis/steps/step-05-present-findings.md