amazingteam 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.
- package/.ai-team/agents/architect.md +144 -0
- package/.ai-team/agents/ci-analyst.md +188 -0
- package/.ai-team/agents/developer.md +176 -0
- package/.ai-team/agents/planner.md +355 -0
- package/.ai-team/agents/qa.md +189 -0
- package/.ai-team/agents/reviewer.md +211 -0
- package/.ai-team/agents/triage.md +146 -0
- package/.ai-team/commands/ci-analyze.md +116 -0
- package/.ai-team/commands/design.md +100 -0
- package/.ai-team/commands/implement.md +108 -0
- package/.ai-team/commands/release-check.md +142 -0
- package/.ai-team/commands/review.md +142 -0
- package/.ai-team/commands/test.md +115 -0
- package/.ai-team/commands/triage.md +138 -0
- package/.ai-team/memory/architect/architecture_notes.md +67 -0
- package/.ai-team/memory/architect/design_rationale.md +113 -0
- package/.ai-team/memory/architect/module_map.md +84 -0
- package/.ai-team/memory/ci-analyst/failure_patterns.md +102 -0
- package/.ai-team/memory/ci-analyst/runbook_references.md +87 -0
- package/.ai-team/memory/developer/bug_investigation.md +102 -0
- package/.ai-team/memory/developer/build_issues.md +115 -0
- package/.ai-team/memory/developer/implementation_notes.md +83 -0
- package/.ai-team/memory/failures/failure_library.md +103 -0
- package/.ai-team/memory/planner/decomposition_notes.md +82 -0
- package/.ai-team/memory/planner/flow_rules.md +86 -0
- package/.ai-team/memory/planner/github_issue_patterns.md +229 -0
- package/.ai-team/memory/qa/regression_cases.md +101 -0
- package/.ai-team/memory/qa/test_strategy.md +138 -0
- package/.ai-team/memory/qa/validation_notes.md +110 -0
- package/.ai-team/memory/reviewer/quality_rules.md +105 -0
- package/.ai-team/memory/reviewer/recurring_risks.md +109 -0
- package/.ai-team/memory/reviewer/review_notes.md +124 -0
- package/.ai-team/memory/triage/classification_heuristics.md +82 -0
- package/.ai-team/memory/triage/debug_notes.md +87 -0
- package/.ai-team/opencode.template.jsonc +216 -0
- package/.ai-team/skills/bugfix-playbook/skill.md +174 -0
- package/.ai-team/skills/ci-failure-analysis/skill.md +176 -0
- package/.ai-team/skills/issue-triage/skill.md +163 -0
- package/.ai-team/skills/regression-checklist/skill.md +176 -0
- package/.ai-team/skills/release-readiness-check/skill.md +216 -0
- package/.ai-team/skills/repo-architecture-reader/skill.md +139 -0
- package/.ai-team/skills/safe-refactor-checklist/skill.md +215 -0
- package/.ai-team/skills/task-breakdown-and-dispatch/skill.md +151 -0
- package/.ai-team/skills/test-first-feature-dev/skill.md +205 -0
- package/.ai-team/workflows/ci.yml +81 -0
- package/.ai-team/workflows/nightly-ai-maintenance.yml +129 -0
- package/.ai-team/workflows/opencode.yml +33 -0
- package/.ai-team/workflows/pr-check.yml +41 -0
- package/.foundation/foundation.lock +38 -0
- package/.foundation/local-overrides.md +97 -0
- package/.foundation/upgrade-history.md +38 -0
- package/.opencode/agents/architect.md +38 -0
- package/.opencode/agents/ci-analyst.md +38 -0
- package/.opencode/agents/developer.md +43 -0
- package/.opencode/agents/planner.md +47 -0
- package/.opencode/agents/qa.md +34 -0
- package/.opencode/agents/reviewer.md +38 -0
- package/.opencode/agents/triage.md +37 -0
- package/.opencode/commands/auto.md +264 -0
- package/.opencode/commands/breakdown-issue.md +94 -0
- package/.opencode/commands/ci-analyze.md +15 -0
- package/.opencode/commands/close-parent-task.md +122 -0
- package/.opencode/commands/design.md +15 -0
- package/.opencode/commands/dispatch-next.md +102 -0
- package/.opencode/commands/implement.md +16 -0
- package/.opencode/commands/release-check.md +16 -0
- package/.opencode/commands/resume.md +88 -0
- package/.opencode/commands/review.md +15 -0
- package/.opencode/commands/show-blockers.md +97 -0
- package/.opencode/commands/summarize-parent.md +121 -0
- package/.opencode/commands/test.md +15 -0
- package/.opencode/commands/triage.md +109 -0
- package/.opencode/skills/bugfix-playbook/SKILL.md +81 -0
- package/.opencode/skills/ci-failure-analysis/SKILL.md +94 -0
- package/.opencode/skills/issue-triage/SKILL.md +80 -0
- package/.opencode/skills/regression-checklist/SKILL.md +81 -0
- package/.opencode/skills/release-readiness-check/SKILL.md +81 -0
- package/.opencode/skills/repo-architecture-reader/SKILL.md +65 -0
- package/.opencode/skills/safe-refactor-checklist/SKILL.md +76 -0
- package/.opencode/skills/task-breakdown-and-dispatch/SKILL.md +255 -0
- package/.opencode/skills/test-first-feature-dev/SKILL.md +78 -0
- package/AGENTS.md +879 -0
- package/CHANGELOG.md +261 -0
- package/LICENSE +21 -0
- package/README.md +1215 -0
- package/VERSION +1 -0
- package/action/__tests__/downloader.test.js +251 -0
- package/action/__tests__/merger.test.js +156 -0
- package/action/__tests__/path-resolver.test.js +199 -0
- package/action/__tests__/validator.test.js +310 -0
- package/action/action.yml +61 -0
- package/action/index.js +223 -0
- package/action/lib/downloader.js +344 -0
- package/action/lib/merger.js +170 -0
- package/action/lib/path-resolver.js +176 -0
- package/action/lib/setup.js +286 -0
- package/action/lib/validator.js +324 -0
- package/cli/__tests__/cli.test.js +270 -0
- package/cli/amazingteam.cjs +225 -0
- package/cli/commands/check-update.cjs +159 -0
- package/cli/commands/init.cjs +412 -0
- package/cli/commands/local.cjs +264 -0
- package/cli/commands/migrate.cjs +316 -0
- package/cli/commands/status.cjs +241 -0
- package/cli/commands/upgrade.cjs +213 -0
- package/cli/commands/validate.cjs +259 -0
- package/cli/commands/version.cjs +59 -0
- package/cli/sync.cjs +237 -0
- package/dist/index.js +35 -0
- package/docs/architecture/overview.md +138 -0
- package/docs/blocker_resolution_design.md +372 -0
- package/docs/bootstrap-model.md +356 -0
- package/docs/config-reference.md +458 -0
- package/docs/how-to-use.md +178 -0
- package/docs/migration-to-v3.md +355 -0
- package/docs/overlay-guide.md +156 -0
- package/docs/patterns/README.md +67 -0
- package/docs/quick-start-v3.md +330 -0
- package/docs/releases/README.md +64 -0
- package/docs/runbooks/ci/README.md +62 -0
- package/docs/runbooks/ci/build-debug.md +120 -0
- package/docs/runbooks/ci/flaky-tests.md +127 -0
- package/docs/runbooks/getting-started.md +81 -0
- package/docs/upgrade-policy.md +188 -0
- package/docs/versioning.md +199 -0
- package/overlays/README.md +30 -0
- package/overlays/ai-agent-product/.ai-team/skills/llm-integration/skill.md +99 -0
- package/overlays/ai-agent-product/docs/ai-agent-architecture.md +68 -0
- package/overlays/ai-agent-product/overlay.yaml +26 -0
- package/overlays/cpp-qt-desktop/.ai-team/skills/qt-signals-slots/skill.md +60 -0
- package/overlays/cpp-qt-desktop/docs/qt-conventions.md +64 -0
- package/overlays/cpp-qt-desktop/overlay.yaml +22 -0
- package/overlays/python-backend/.ai-team/skills/python-testing/skill.md +90 -0
- package/overlays/python-backend/docs/python-style.md +78 -0
- package/overlays/python-backend/overlay.yaml +22 -0
- package/overlays/web-fullstack/.ai-team/skills/frontend-testing/skill.md +70 -0
- package/overlays/web-fullstack/docs/frontend-conventions.md +68 -0
- package/overlays/web-fullstack/overlay.yaml +26 -0
- package/package.json +84 -0
- package/presets/default.yaml +161 -0
- package/presets/go.yaml +43 -0
- package/presets/python.yaml +43 -0
- package/presets/typescript.yaml +40 -0
- package/schemas/config.schema.json +239 -0
- package/scripts/diff_foundation_vs_project.sh +134 -0
- package/scripts/generate_docs.sh +200 -0
- package/scripts/init_project.sh +455 -0
- package/scripts/plan_upgrade.sh +268 -0
- package/scripts/upgrade_foundation.sh +365 -0
- package/scripts/validate-foundation.cjs +278 -0
- package/scripts/validate_foundation.sh +192 -0
- package/scripts/validate_project_setup.sh +171 -0
- package/tasks/README.md +94 -0
- package/tasks/_template/analysis.md +76 -0
- package/tasks/_template/design.md +121 -0
- package/tasks/_template/implementation.md +121 -0
- package/tasks/_template/release.md +119 -0
- package/tasks/_template/review.md +131 -0
- package/tasks/_template/subtasks/task.yaml +24 -0
- package/tasks/_template/task.yaml +75 -0
- package/tasks/_template/validation.md +128 -0
- package/templates/amazingteam.yml +81 -0
- package/templates/gitignore +14 -0
- package/templates/opencode.jsonc +216 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/schema.json",
|
|
3
|
+
"version": "{{AI_TEAM_VERSION}}",
|
|
4
|
+
"project": {
|
|
5
|
+
"name": "{{PROJECT_NAME}}",
|
|
6
|
+
"description": "{{PROJECT_DESCRIPTION}}",
|
|
7
|
+
"language": "{{LANGUAGE}}",
|
|
8
|
+
"framework": "{{FRAMEWORK}}"
|
|
9
|
+
},
|
|
10
|
+
"agents": {
|
|
11
|
+
"planner": {
|
|
12
|
+
"description": "Decomposes tasks and coordinates workflow progression",
|
|
13
|
+
"model": "default",
|
|
14
|
+
"skills": ["task-breakdown-and-dispatch"],
|
|
15
|
+
"commands": [],
|
|
16
|
+
"memory": {
|
|
17
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/planner/", ".ai-team/memory/architect/", ".ai-team/memory/triage/", ".ai-team/memory/failures/", "tasks/"],
|
|
18
|
+
"write": [".ai-team/memory/planner/", "tasks/{task_id}/task.yaml"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"architect": {
|
|
22
|
+
"description": "Analyzes requirements and designs solutions",
|
|
23
|
+
"model": "default",
|
|
24
|
+
"skills": ["repo-architecture-reader"],
|
|
25
|
+
"commands": ["/design"],
|
|
26
|
+
"memory": {
|
|
27
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/planner/", ".ai-team/memory/architect/", ".ai-team/memory/developer/", ".ai-team/memory/failures/", "tasks/"],
|
|
28
|
+
"write": [".ai-team/memory/architect/", "tasks/{task_id}/analysis.md", "tasks/{task_id}/design.md"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"developer": {
|
|
32
|
+
"description": "Implements features and fixes bugs",
|
|
33
|
+
"model": "default",
|
|
34
|
+
"skills": ["test-first-feature-dev", "bugfix-playbook"],
|
|
35
|
+
"commands": ["/implement"],
|
|
36
|
+
"memory": {
|
|
37
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/planner/", ".ai-team/memory/architect/", ".ai-team/memory/developer/", ".ai-team/memory/failures/", "tasks/{task_id}/"],
|
|
38
|
+
"write": [".ai-team/memory/developer/", "tasks/{task_id}/implementation.md", "src/", "tests/"]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"qa": {
|
|
42
|
+
"description": "Validates implementations and ensures quality",
|
|
43
|
+
"model": "default",
|
|
44
|
+
"skills": ["test-first-feature-dev", "regression-checklist"],
|
|
45
|
+
"commands": ["/test"],
|
|
46
|
+
"memory": {
|
|
47
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/planner/", ".ai-team/memory/architect/", ".ai-team/memory/qa/", ".ai-team/memory/failures/", "tasks/{task_id}/"],
|
|
48
|
+
"write": [".ai-team/memory/qa/", "tasks/{task_id}/validation.md", "tests/"]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"reviewer": {
|
|
52
|
+
"description": "Reviews code for quality and correctness",
|
|
53
|
+
"model": "default",
|
|
54
|
+
"skills": ["safe-refactor-checklist", "regression-checklist", "release-readiness-check"],
|
|
55
|
+
"commands": ["/review", "/release-check"],
|
|
56
|
+
"memory": {
|
|
57
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/", ".ai-team/memory/failures/", "tasks/{task_id}/"],
|
|
58
|
+
"write": [".ai-team/memory/reviewer/", "tasks/{task_id}/review.md", "tasks/{task_id}/release.md"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"triage": {
|
|
62
|
+
"description": "Classifies issues and performs first-pass debug analysis",
|
|
63
|
+
"model": "default",
|
|
64
|
+
"skills": ["issue-triage", "bugfix-playbook"],
|
|
65
|
+
"commands": ["/triage"],
|
|
66
|
+
"memory": {
|
|
67
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/triage/", ".ai-team/memory/failures/", "tasks/{task_id}/"],
|
|
68
|
+
"write": [".ai-team/memory/triage/", "tasks/{task_id}/"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"ci-analyst": {
|
|
72
|
+
"description": "Investigates CI failures and documents patterns",
|
|
73
|
+
"model": "default",
|
|
74
|
+
"skills": ["ci-failure-analysis", "bugfix-playbook"],
|
|
75
|
+
"commands": ["/ci-analyze"],
|
|
76
|
+
"memory": {
|
|
77
|
+
"read": ["docs/", "AGENTS.md", ".ai-team/memory/ci-analyst/", ".ai-team/memory/failures/", "tasks/{task_id}/", "docs/runbooks/ci/"],
|
|
78
|
+
"write": [".ai-team/memory/ci-analyst/", ".ai-team/memory/failures/", "tasks/{task_id}/"]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"skills": {
|
|
83
|
+
"repo-architecture-reader": {
|
|
84
|
+
"path": ".ai-team/skills/repo-architecture-reader/skill.md"
|
|
85
|
+
},
|
|
86
|
+
"bugfix-playbook": {
|
|
87
|
+
"path": ".ai-team/skills/bugfix-playbook/skill.md"
|
|
88
|
+
},
|
|
89
|
+
"test-first-feature-dev": {
|
|
90
|
+
"path": ".ai-team/skills/test-first-feature-dev/skill.md"
|
|
91
|
+
},
|
|
92
|
+
"safe-refactor-checklist": {
|
|
93
|
+
"path": ".ai-team/skills/safe-refactor-checklist/skill.md"
|
|
94
|
+
},
|
|
95
|
+
"task-breakdown-and-dispatch": {
|
|
96
|
+
"path": ".ai-team/skills/task-breakdown-and-dispatch/skill.md"
|
|
97
|
+
},
|
|
98
|
+
"issue-triage": {
|
|
99
|
+
"path": ".ai-team/skills/issue-triage/skill.md"
|
|
100
|
+
},
|
|
101
|
+
"ci-failure-analysis": {
|
|
102
|
+
"path": ".ai-team/skills/ci-failure-analysis/skill.md"
|
|
103
|
+
},
|
|
104
|
+
"regression-checklist": {
|
|
105
|
+
"path": ".ai-team/skills/regression-checklist/skill.md"
|
|
106
|
+
},
|
|
107
|
+
"release-readiness-check": {
|
|
108
|
+
"path": ".ai-team/skills/release-readiness-check/skill.md"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"commands": {
|
|
112
|
+
"/triage": {
|
|
113
|
+
"path": ".ai-team/commands/triage.md",
|
|
114
|
+
"agent": "triage"
|
|
115
|
+
},
|
|
116
|
+
"/design": {
|
|
117
|
+
"path": ".ai-team/commands/design.md",
|
|
118
|
+
"agent": "architect"
|
|
119
|
+
},
|
|
120
|
+
"/implement": {
|
|
121
|
+
"path": ".ai-team/commands/implement.md",
|
|
122
|
+
"agent": "developer"
|
|
123
|
+
},
|
|
124
|
+
"/test": {
|
|
125
|
+
"path": ".ai-team/commands/test.md",
|
|
126
|
+
"agent": "qa"
|
|
127
|
+
},
|
|
128
|
+
"/review": {
|
|
129
|
+
"path": ".ai-team/commands/review.md",
|
|
130
|
+
"agent": "reviewer"
|
|
131
|
+
},
|
|
132
|
+
"/ci-analyze": {
|
|
133
|
+
"path": ".ai-team/commands/ci-analyze.md",
|
|
134
|
+
"agent": "ci-analyst"
|
|
135
|
+
},
|
|
136
|
+
"/release-check": {
|
|
137
|
+
"path": ".ai-team/commands/release-check.md",
|
|
138
|
+
"agent": "reviewer"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"workflows": {
|
|
142
|
+
"feature": ["planner", "architect", "developer", "qa", "reviewer"],
|
|
143
|
+
"bugfix": ["triage", "architect", "developer", "qa", "reviewer"],
|
|
144
|
+
"refactor": ["architect", "developer", "reviewer"],
|
|
145
|
+
"ci-failure": ["ci-analyst", "developer", "qa"],
|
|
146
|
+
"release": ["reviewer"]
|
|
147
|
+
},
|
|
148
|
+
"memory": {
|
|
149
|
+
"global": {
|
|
150
|
+
"locations": ["docs/", "AGENTS.md"],
|
|
151
|
+
"writeRequiresApproval": true
|
|
152
|
+
},
|
|
153
|
+
"role": {
|
|
154
|
+
"base_path": ".ai-team/memory",
|
|
155
|
+
"roles": {
|
|
156
|
+
"planner": {
|
|
157
|
+
"files": ["decomposition_notes.md", "flow_rules.md"]
|
|
158
|
+
},
|
|
159
|
+
"architect": {
|
|
160
|
+
"files": ["architecture_notes.md", "module_map.md", "design_rationale.md"]
|
|
161
|
+
},
|
|
162
|
+
"developer": {
|
|
163
|
+
"files": ["implementation_notes.md", "bug_investigation.md", "build_issues.md"]
|
|
164
|
+
},
|
|
165
|
+
"qa": {
|
|
166
|
+
"files": ["test_strategy.md", "regression_cases.md", "validation_notes.md"]
|
|
167
|
+
},
|
|
168
|
+
"reviewer": {
|
|
169
|
+
"files": ["review_notes.md", "quality_rules.md", "recurring_risks.md"]
|
|
170
|
+
},
|
|
171
|
+
"triage": {
|
|
172
|
+
"files": ["classification_heuristics.md", "debug_notes.md"]
|
|
173
|
+
},
|
|
174
|
+
"ci-analyst": {
|
|
175
|
+
"files": ["failure_patterns.md", "runbook_references.md"]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"failures": {
|
|
180
|
+
"path": ".ai-team/memory/failures",
|
|
181
|
+
"files": ["failure_library.md"],
|
|
182
|
+
"writableBy": ["ci-analyst"]
|
|
183
|
+
},
|
|
184
|
+
"task": {
|
|
185
|
+
"base_path": "tasks",
|
|
186
|
+
"naming": "issue-{issue_id}",
|
|
187
|
+
"files": ["task.yaml", "analysis.md", "design.md", "implementation.md", "validation.md", "review.md", "release.md"],
|
|
188
|
+
"autoCreate": true,
|
|
189
|
+
"preserveAfterCompletion": true
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"rules": {
|
|
193
|
+
"maxChangesPerCommit": 10,
|
|
194
|
+
"requireTests": true,
|
|
195
|
+
"requireReview": true,
|
|
196
|
+
"autoMerge": false,
|
|
197
|
+
"memoryIsolation": true,
|
|
198
|
+
"protectedPaths": ["docs/architecture/", "docs/decisions/"],
|
|
199
|
+
"humanApprovalRequired": ["architecture changes", "release operations", "breaking changes"]
|
|
200
|
+
},
|
|
201
|
+
"integrations": {
|
|
202
|
+
"github": {
|
|
203
|
+
"enabled": true,
|
|
204
|
+
"autoLabel": true,
|
|
205
|
+
"autoAssign": true
|
|
206
|
+
},
|
|
207
|
+
"ci": {
|
|
208
|
+
"enabled": true,
|
|
209
|
+
"requirePassing": true,
|
|
210
|
+
"failureAnalysis": {
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"agent": "ci-analyst"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Bug Fix Playbook
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This skill provides a systematic approach to identifying, analyzing, and fixing bugs.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Fixing reported bugs
|
|
10
|
+
- Debugging production issues
|
|
11
|
+
- Investigating test failures
|
|
12
|
+
- Resolving regression issues
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
### 1. Reproduce the Bug
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
1. Document exact reproduction steps
|
|
20
|
+
2. Verify the bug exists in current version
|
|
21
|
+
3. Identify if bug is environment-specific
|
|
22
|
+
4. Create minimal reproduction case
|
|
23
|
+
5. Capture relevant logs/errors
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Gather Information
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
1. Review bug report details
|
|
30
|
+
2. Check for related issues (past or present)
|
|
31
|
+
3. Review recent changes that might be related
|
|
32
|
+
4. Collect stack traces and error logs
|
|
33
|
+
5. Note any user-reported symptoms
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. Locate the Source
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
1. Use stack traces to identify locations
|
|
40
|
+
2. Search for error messages in codebase
|
|
41
|
+
3. Trace execution flow from entry point
|
|
42
|
+
4. Use debugging tools (logs, breakpoints, etc.)
|
|
43
|
+
5. Identify the specific file and function
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 4. Analyze the Root Cause
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
1. Understand the expected behavior
|
|
50
|
+
2. Compare with actual behavior
|
|
51
|
+
3. Identify why the discrepancy occurs
|
|
52
|
+
4. Consider edge cases
|
|
53
|
+
5. Document the root cause clearly
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 5. Design the Fix
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
1. Determine the minimal change needed
|
|
60
|
+
2. Consider potential side effects
|
|
61
|
+
3. Think about similar issues elsewhere
|
|
62
|
+
4. Plan any necessary refactoring
|
|
63
|
+
5. Document the fix approach
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 6. Implement the Fix
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
1. Write the fix (minimal, targeted)
|
|
70
|
+
2. Add/update tests
|
|
71
|
+
3. Verify fix resolves the issue
|
|
72
|
+
4. Run all tests to catch regressions
|
|
73
|
+
5. Update documentation if needed
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 7. Verify the Solution
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
1. Reproduce original bug (should fail before fix)
|
|
80
|
+
2. Apply fix
|
|
81
|
+
3. Verify bug is resolved
|
|
82
|
+
4. Run test suite
|
|
83
|
+
5. Manual testing of affected area
|
|
84
|
+
6. Check for related issues
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Root Cause Analysis Template
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## Bug Analysis: [Bug Title]
|
|
91
|
+
|
|
92
|
+
### Issue
|
|
93
|
+
[Description of the bug]
|
|
94
|
+
|
|
95
|
+
### Symptoms
|
|
96
|
+
- [Symptom 1]
|
|
97
|
+
- [Symptom 2]
|
|
98
|
+
|
|
99
|
+
### Root Cause
|
|
100
|
+
[Explanation of why the bug occurs]
|
|
101
|
+
|
|
102
|
+
### Affected Code
|
|
103
|
+
- `file_path:line_number` - [Description]
|
|
104
|
+
|
|
105
|
+
### Fix Approach
|
|
106
|
+
[Description of how to fix]
|
|
107
|
+
|
|
108
|
+
### Risk Assessment
|
|
109
|
+
- **Risk Level**: [Low/Medium/High]
|
|
110
|
+
- **Impact if unfixed**: [Description]
|
|
111
|
+
- **Potential side effects**: [Description]
|
|
112
|
+
|
|
113
|
+
### Tests to Add
|
|
114
|
+
1. [Test case 1]
|
|
115
|
+
2. [Test case 2]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Commit Message Template
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
fix(scope): brief description of the fix
|
|
122
|
+
|
|
123
|
+
- What was the issue
|
|
124
|
+
- What was the root cause
|
|
125
|
+
- How it was fixed
|
|
126
|
+
|
|
127
|
+
Fixes #issue-number
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Checklist
|
|
131
|
+
|
|
132
|
+
- [ ] Bug reproduced
|
|
133
|
+
- [ ] Root cause identified
|
|
134
|
+
- [ ] Fix implemented (minimal change)
|
|
135
|
+
- [ ] Tests added for the bug
|
|
136
|
+
- [ ] All tests pass
|
|
137
|
+
- [ ] No regressions detected
|
|
138
|
+
- [ ] Documentation updated (if needed)
|
|
139
|
+
- [ ] PR created with proper description
|
|
140
|
+
|
|
141
|
+
## Common Bug Patterns
|
|
142
|
+
|
|
143
|
+
### Null/Undefined Errors
|
|
144
|
+
- Missing null checks
|
|
145
|
+
- Uninitialized variables
|
|
146
|
+
- Optional chaining issues
|
|
147
|
+
|
|
148
|
+
### Logic Errors
|
|
149
|
+
- Off-by-one errors
|
|
150
|
+
- Incorrect conditions
|
|
151
|
+
- Missing edge cases
|
|
152
|
+
|
|
153
|
+
### Async Issues
|
|
154
|
+
- Race conditions
|
|
155
|
+
- Unhandled promises
|
|
156
|
+
- Incorrect async/await usage
|
|
157
|
+
|
|
158
|
+
### State Issues
|
|
159
|
+
- Stale state
|
|
160
|
+
- Incorrect state updates
|
|
161
|
+
- Missing state reset
|
|
162
|
+
|
|
163
|
+
### Integration Issues
|
|
164
|
+
- API contract mismatch
|
|
165
|
+
- Version incompatibility
|
|
166
|
+
- Environment differences
|
|
167
|
+
|
|
168
|
+
## Best Practices
|
|
169
|
+
|
|
170
|
+
- Fix the root cause, not the symptom
|
|
171
|
+
- Add regression tests for all bugs
|
|
172
|
+
- Keep fixes minimal and focused
|
|
173
|
+
- Update documentation if behavior changes
|
|
174
|
+
- Consider if similar bugs exist elsewhere
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# CI Failure Analysis
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This skill provides systematic investigation and resolution of CI pipeline failures.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- CI pipeline failure
|
|
10
|
+
- Flaky test investigation
|
|
11
|
+
- Build failure diagnosis
|
|
12
|
+
- Infrastructure issue investigation
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
### 1. Gather Failure Context
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
1. Identify failed pipeline/stage
|
|
20
|
+
2. Collect error messages and logs
|
|
21
|
+
3. Note failure timestamp and branch
|
|
22
|
+
4. Identify commit that triggered failure
|
|
23
|
+
5. Check if failure is intermittent or consistent
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Classify Failure Type
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
1. Build failure:
|
|
30
|
+
- Compilation error
|
|
31
|
+
- Dependency resolution failure
|
|
32
|
+
- Configuration error
|
|
33
|
+
2. Test failure:
|
|
34
|
+
- Unit test failure
|
|
35
|
+
- Integration test failure
|
|
36
|
+
- E2E test failure
|
|
37
|
+
3. Infrastructure failure:
|
|
38
|
+
- Resource unavailability
|
|
39
|
+
- Timeout
|
|
40
|
+
- Network issue
|
|
41
|
+
4. Code quality failure:
|
|
42
|
+
- Lint error
|
|
43
|
+
- Type error
|
|
44
|
+
- Security scan failure
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Analyze Root Cause
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
1. Examine error stack trace
|
|
51
|
+
2. Check recent changes to affected files
|
|
52
|
+
3. Compare with previous successful builds
|
|
53
|
+
4. Identify environment differences
|
|
54
|
+
5. Check for resource constraints
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 4. Check Known Patterns
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
1. Query failure library for similar issues
|
|
61
|
+
2. Check docs/runbooks/ci/ for known problems
|
|
62
|
+
3. Review .ai-team/memory/failures/ for patterns
|
|
63
|
+
4. Identify if this is a recurring issue
|
|
64
|
+
5. Note any infrastructure issues
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 5. Determine Fix Strategy
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
1. Code fix:
|
|
71
|
+
- Identify files to change
|
|
72
|
+
- Determine minimal fix
|
|
73
|
+
- Create fix branch
|
|
74
|
+
2. Configuration fix:
|
|
75
|
+
- Identify config files
|
|
76
|
+
- Update settings
|
|
77
|
+
- Test locally
|
|
78
|
+
3. Infrastructure fix:
|
|
79
|
+
- Document infrastructure issue
|
|
80
|
+
- Request infrastructure support
|
|
81
|
+
- Add workaround if possible
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 6. Implement and Verify
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
1. Apply fix
|
|
88
|
+
2. Run relevant tests locally
|
|
89
|
+
3. Push fix to CI
|
|
90
|
+
4. Monitor pipeline
|
|
91
|
+
5. Document resolution
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 7. Update Knowledge Base
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
1. If new failure pattern: add to failure library
|
|
98
|
+
2. If infrastructure issue: update runbook
|
|
99
|
+
3. Document solution for future reference
|
|
100
|
+
4. Update CI memory if recurring issue
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Failure Analysis Report Template
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
## CI Failure Analysis: [Build #]
|
|
107
|
+
|
|
108
|
+
### Summary
|
|
109
|
+
- **Pipeline**: [Pipeline name]
|
|
110
|
+
- **Stage**: [Failed stage]
|
|
111
|
+
- **Branch**: [Branch name]
|
|
112
|
+
- **Commit**: [Commit hash]
|
|
113
|
+
- **Timestamp**: [Failure time]
|
|
114
|
+
|
|
115
|
+
### Failure Classification
|
|
116
|
+
- **Type**: build | test | infrastructure | quality
|
|
117
|
+
- **Severity**: blocking | non-blocking
|
|
118
|
+
- **Pattern**: new | recurring | flaky
|
|
119
|
+
|
|
120
|
+
### Error Details
|
|
121
|
+
```
|
|
122
|
+
[Paste relevant error logs]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Root Cause
|
|
126
|
+
[Explanation of why the failure occurred]
|
|
127
|
+
|
|
128
|
+
### Affected Files
|
|
129
|
+
- `path/to/file.ts` - [Impact description]
|
|
130
|
+
|
|
131
|
+
### Resolution
|
|
132
|
+
- **Fix Type**: code | config | infrastructure
|
|
133
|
+
- **Fix Description**: [How to fix]
|
|
134
|
+
- **PR/Commit**: [Reference to fix]
|
|
135
|
+
|
|
136
|
+
### Prevention
|
|
137
|
+
[How to prevent this in the future]
|
|
138
|
+
|
|
139
|
+
### Related Issues
|
|
140
|
+
- #[issue number] - [description]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Failure Classification Matrix
|
|
144
|
+
|
|
145
|
+
| Error Type | Likely Cause | Investigation Path |
|
|
146
|
+
|------------|--------------|---------------------|
|
|
147
|
+
| Compilation error | Syntax/type error | Check error line, recent changes |
|
|
148
|
+
| Dependency error | Missing/incompatible package | Check package.json, lock file |
|
|
149
|
+
| Test assertion failure | Code logic error | Check test, implementation |
|
|
150
|
+
| Test timeout | Slow operation/hang | Profile, check resources |
|
|
151
|
+
| Flaky test | Race condition/timing | Check async code, mocks |
|
|
152
|
+
| Out of memory | Resource leak | Check memory usage, leaks |
|
|
153
|
+
| Network timeout | External dependency | Check service status, add retry |
|
|
154
|
+
| Permission denied | Access control | Check permissions, CI config |
|
|
155
|
+
|
|
156
|
+
## Checklist
|
|
157
|
+
|
|
158
|
+
- [ ] Failure context gathered
|
|
159
|
+
- [ ] Failure type classified
|
|
160
|
+
- [ ] Root cause analyzed
|
|
161
|
+
- [ ] Known patterns checked
|
|
162
|
+
- [ ] Fix strategy determined
|
|
163
|
+
- [ ] Fix implemented
|
|
164
|
+
- [ ] CI verification passed
|
|
165
|
+
- [ ] Knowledge base updated
|
|
166
|
+
- [ ] Failure library updated (if new pattern)
|
|
167
|
+
|
|
168
|
+
## Best Practices
|
|
169
|
+
|
|
170
|
+
- Always check recent commits first
|
|
171
|
+
- Compare with last successful build
|
|
172
|
+
- Check if failure is environment-specific
|
|
173
|
+
- Document all findings, even negative ones
|
|
174
|
+
- Add flaky tests to known flaky list
|
|
175
|
+
- Create regression tests for bug fixes
|
|
176
|
+
- Update runbooks for recurring issues
|