@groupby/ai-dev 0.5.5 → 0.5.8
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/package.json +1 -1
- package/teams/OOF/skills/jira-ticket-creator/README.md +22 -0
- package/teams/OOF/skills/jira-ticket-creator/SKILL.md +266 -0
- package/teams/fhr-ai-team/github/PULL_REQUEST_TEMPLATE/full.md +31 -0
- package/teams/fhr-ai-team/github/PULL_REQUEST_TEMPLATE/light.md +7 -0
- package/teams/fhr-ai-team/github/copilot-instructions.md +24 -0
- package/teams/fhr-ai-team/github/instructions/python.instructions.md +23 -0
- package/teams/fhr-ai-team/github/pull_request_template.md +21 -0
- package/teams/fhr-ai-team/prompts/brainstorm.md +7 -0
- package/teams/fhr-ai-team/prompts/plan-algo-tests.md +7 -0
- package/teams/fhr-ai-team/prompts/plan.md +7 -0
- package/teams/fhr-ai-team/prompts/pr-description.md +7 -0
- package/teams/fhr-ai-team/prompts/test.md +7 -0
- package/teams/fhr-ai-team/resources/AGENTS.md +55 -0
- package/teams/fhr-ai-team/resources/CLAUDE.md +52 -0
- package/teams/fhr-ai-team/resources/README.md +51 -0
- package/teams/fhr-ai-team/resources/claude-code-setup.md +60 -0
- package/teams/fhr-ai-team/resources/copilot-setup.md +64 -0
- package/teams/fhr-ai-team/resources/onboarding.md +179 -0
- package/teams/fhr-ai-team/resources/opencode-install.md +29 -0
- package/teams/fhr-ai-team/resources/opencode-setup.md +43 -0
- package/teams/fhr-ai-team/skills/algo-test-planning/SKILL.md +192 -0
- package/teams/fhr-ai-team/skills/algo-test-planning/references/pipeline-registry.md +280 -0
- package/teams/fhr-ai-team/skills/brainstorming/SKILL.md +111 -0
- package/teams/fhr-ai-team/skills/e2e-testing/SKILL.md +163 -0
- package/teams/fhr-ai-team/skills/grill-me/SKILL.md +10 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/SKILL.md +313 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/references/kubectl-debug.md +165 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/references/mongodb-config.md +218 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/references/pipeline-configs.md +190 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/references/pipeline-steps.md +182 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/scripts/kf_logs.py +203 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/scripts/kf_query.py +233 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/scripts/kf_wait.py +195 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/scripts/mlflow_query.py +252 -0
- package/teams/fhr-ai-team/skills/ml-tooling-dev/scripts/mongo_predictor.py +352 -0
- package/teams/fhr-ai-team/skills/naming-conventions-reviewer/SKILL.md +230 -0
- package/teams/fhr-ai-team/skills/naming-conventions-reviewer/references/dataset-naming.md +190 -0
- package/teams/fhr-ai-team/skills/naming-conventions-reviewer/references/domain-vocabulary.md +447 -0
- package/teams/fhr-ai-team/skills/naming-conventions-reviewer/references/repo-dependency-graph.md +264 -0
- package/teams/fhr-ai-team/skills/planning/SKILL.md +138 -0
- package/teams/fhr-ai-team/skills/pr-description/SKILL.md +94 -0
- package/teams/snpd/skills/code-review-github/SKILL.md +475 -0
package/teams/fhr-ai-team/skills/naming-conventions-reviewer/references/repo-dependency-graph.md
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Repository Dependency Graph
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
- [Shared Libraries (Foundation Layer)](#shared-libraries)
|
|
5
|
+
- [Dependency Map by Repo](#dependency-map)
|
|
6
|
+
- [Cross-Repo Model Output Consumption](#model-output-flow)
|
|
7
|
+
- [Docker Image to Repo Mapping](#docker-images)
|
|
8
|
+
- [Protobuf Service Definitions](#protobuf-services)
|
|
9
|
+
- [Data Flow Graph](#data-flow-graph)
|
|
10
|
+
- [Kubeflow Config Directory Structure](#kubeflow-directories)
|
|
11
|
+
|
|
12
|
+
## Shared Libraries
|
|
13
|
+
|
|
14
|
+
### Foundation Layer (consumed by almost everything)
|
|
15
|
+
| Package Name | Repo | Published As |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `earlybirds_commons` | `algo.early-birds-python` | `earlybirds_commons` on Artifact Registry |
|
|
18
|
+
| `protobuf-ml` | `protobuf-ml` | `protobuf_ml` on Artifact Registry |
|
|
19
|
+
|
|
20
|
+
### Toolbox Layer (consumed by ML repos)
|
|
21
|
+
| Package Name | Repo | Published As | Depends On |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `torch_toolbox` | `pytorch-toolbox` | `torch-toolbox` / `torch_toolbox` | earlybirds_commons |
|
|
24
|
+
| `eb_tensorflow` | `tensorflow-toolbox` | `eb_tensorflow` | earlybirds_commons, protobuf-ml |
|
|
25
|
+
| `item-toolbox` | `item-toolbox` | `item` (import as `item`) | earlybirds_commons, eb_tensorflow, nlp, protobuf-ml |
|
|
26
|
+
| `nlp-toolbox` | `nlp-toolbox` | `nlp` (import as `nlp`) | earlybirds_commons, eb_tensorflow |
|
|
27
|
+
|
|
28
|
+
### Dependency Groupings
|
|
29
|
+
**PyTorch-based repos** (use torch_toolbox):
|
|
30
|
+
- algo.clip-ml, algo.semantic-search-ml, algo.semantic-search-bge-m3-ml
|
|
31
|
+
|
|
32
|
+
**TensorFlow-based repos** (use eb_tensorflow):
|
|
33
|
+
- algo.autocomplete-ml, algo.fm-ml, algo.gpt-ml, algo.image-classifier, algo.image-encoder,
|
|
34
|
+
algo.object-detection, algo.search-ml, algo.shop-the-look-ml, algo.shop-the-look-monitoring,
|
|
35
|
+
algo.tagging-ml, algo.user-intent-ml, algo.visual-search
|
|
36
|
+
|
|
37
|
+
## Dependency Map
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
earlybirds_commons (algo.early-birds-python)
|
|
41
|
+
+-- protobuf-ml
|
|
42
|
+
|
|
|
43
|
+
+-- eb_tensorflow (tensorflow-toolbox)
|
|
44
|
+
| +-- earlybirds_commons
|
|
45
|
+
| +-- protobuf-ml
|
|
46
|
+
|
|
|
47
|
+
+-- torch_toolbox (pytorch-toolbox)
|
|
48
|
+
| +-- earlybirds_commons
|
|
49
|
+
|
|
|
50
|
+
+-- item-toolbox (published as "item")
|
|
51
|
+
| +-- earlybirds_commons
|
|
52
|
+
| +-- eb_tensorflow
|
|
53
|
+
| +-- nlp
|
|
54
|
+
| +-- protobuf-ml
|
|
55
|
+
|
|
|
56
|
+
+-- nlp-toolbox (published as "nlp")
|
|
57
|
+
+-- earlybirds_commons
|
|
58
|
+
+-- eb_tensorflow
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Per-Repo Dependencies
|
|
62
|
+
|
|
63
|
+
| Repo | earlybirds_commons | eb_tensorflow | torch_toolbox | item | nlp | protobuf-ml |
|
|
64
|
+
|---|---|---|---|---|---|---|
|
|
65
|
+
| algo.app-ml | Y | - | - | - | - | - |
|
|
66
|
+
| algo.autocomplete-ml | Y | Y | - | - | Y | Y |
|
|
67
|
+
| algo.clip-ml | Y | - | Y | - | - | - |
|
|
68
|
+
| algo.fhr-data-feed | Y | - | - | - | - | - |
|
|
69
|
+
| algo.fm-ml | Y | Y | - | - | - | Y |
|
|
70
|
+
| algo.gpt-ml | Y | Y | - | Y | Y | Y |
|
|
71
|
+
| algo.image-classifier | Y | Y | - | - | - | - |
|
|
72
|
+
| algo.image-encoder | Y | Y | - | - | - | Y |
|
|
73
|
+
| algo.object-detection | Y | Y | - | Y | - | Y |
|
|
74
|
+
| algo.search-ml | Y | Y | - | Y | - | - |
|
|
75
|
+
| algo.semantic-search-ml | Y | - | Y | - | - | - |
|
|
76
|
+
| algo.semantic-search-bge-m3-ml | Y | - | Y | - | - | - |
|
|
77
|
+
| algo.shop-the-look-ml | Y | Y | - | Y | - | Y |
|
|
78
|
+
| algo.shop-the-look-monitoring | Y | Y | - | Y | - | Y |
|
|
79
|
+
| algo.tagging-ml | Y | Y | - | Y | Y | Y |
|
|
80
|
+
| algo.user-intent-ml | Y | Y | - | - | - | Y |
|
|
81
|
+
| algo.visual-search | Y | Y | - | Y | - | - |
|
|
82
|
+
|
|
83
|
+
### Integration Hub: algo.shop-the-look-ml
|
|
84
|
+
|
|
85
|
+
This repo is the key integration point, consuming outputs from 7 internal packages:
|
|
86
|
+
```
|
|
87
|
+
algo.shop-the-look-ml
|
|
88
|
+
+-- earlybirds_commons (>=3.0.45)
|
|
89
|
+
+-- eb_tensorflow (>=3.1.69)
|
|
90
|
+
+-- item (>=2.0.38)
|
|
91
|
+
+-- tagging (>=1.1.70) <-- from algo.tagging-ml
|
|
92
|
+
+-- object-detection (1.0.28) <-- from algo.object-detection
|
|
93
|
+
+-- visual-search (1.1.18) <-- from algo.visual-search
|
|
94
|
+
+-- visual_tag (0.0.8)
|
|
95
|
+
+-- protobuf-ml (>=2.64.0)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Cross-Repo Model Output Consumption {#model-output-flow}
|
|
99
|
+
|
|
100
|
+
### Model Output -> Consumer Relationships
|
|
101
|
+
|
|
102
|
+
| Producer Repo | Output Type | Consumer Repos |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| algo.image-encoder | Image feature vectors | algo.clip-ml, algo.fm-ml, algo.search-ml, algo.shop-the-look-ml |
|
|
105
|
+
| algo.tagging-ml | Item tags/categories | algo.shop-the-look-ml |
|
|
106
|
+
| algo.object-detection | Bounding boxes (YOLO) | algo.shop-the-look-ml |
|
|
107
|
+
| algo.visual-search | Visual similarity scores | algo.shop-the-look-ml |
|
|
108
|
+
| algo.item-utils | Item data (images, metadata) | All ML repos needing item data |
|
|
109
|
+
| algo.semantic-search-ml | Query/item encodings | algo.app-ml (serving) |
|
|
110
|
+
| algo.search-ml | Search model artifacts | algo.app-ml (serving) |
|
|
111
|
+
|
|
112
|
+
### Shop-the-Look Data Flow
|
|
113
|
+
```
|
|
114
|
+
Raw Item Data
|
|
115
|
+
|
|
|
116
|
+
v
|
|
117
|
+
algo.item-utils (fetch images, prepare data)
|
|
118
|
+
|
|
|
119
|
+
v
|
|
120
|
+
Parallel Processing:
|
|
121
|
+
+-> algo.image-encoder (extract image features)
|
|
122
|
+
+-> algo.tagging-ml (tag items)
|
|
123
|
+
+-> algo.object-detection (detect objects/YOLO)
|
|
124
|
+
+-> algo.visual-search (compute visual similarity)
|
|
125
|
+
+-> algo.clip-ml (CLIP embeddings)
|
|
126
|
+
|
|
|
127
|
+
v
|
|
128
|
+
algo.shop-the-look-ml (CONSUMES ALL ABOVE)
|
|
129
|
+
|
|
|
130
|
+
v
|
|
131
|
+
algo.shop-the-look-monitoring (tracks predictions)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Docker Images
|
|
135
|
+
|
|
136
|
+
### Batch Images (Scala/Dataproc)
|
|
137
|
+
| Image Name | Source Repo | Type |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `algo-fm-batch` | algo.fm-ml | Scala batch |
|
|
140
|
+
| `algo-nlp-dataproc-batch` | nlp-toolbox | Dataproc |
|
|
141
|
+
| `algo-item-dataproc-batch` | algo.item | Dataproc |
|
|
142
|
+
| `algo-search-dataproc-batch` | algo.search | Dataproc |
|
|
143
|
+
| `algo-gpt-dataproc-batch` | algo.gpt | Dataproc |
|
|
144
|
+
| `algo-autocomplete-dataproc-batch` | algo.autocomplete-ml | Dataproc |
|
|
145
|
+
| `algo-stl-batch` | algo.shop-the-look | Batch |
|
|
146
|
+
| `algo-tagging-batch` | algo.tagging | Batch |
|
|
147
|
+
| `algo-basic-batch` | algo.early-birds | Batch |
|
|
148
|
+
| `algo-content-based-batch` | algo.early-birds | Batch |
|
|
149
|
+
| `algo-cv-batch` | algo.computer-vision | Batch |
|
|
150
|
+
| `algo-graph-batch` | algo.early-birds | Batch |
|
|
151
|
+
| `algo-evaluation-preprocessing-batch` | algo.early-birds | Batch |
|
|
152
|
+
| `algo-item-utils` | algo.item-utils | Batch |
|
|
153
|
+
| `algo-model-utils` | algo.model-utils | Batch |
|
|
154
|
+
| `algo-clip-dataproc-batch` | algo.clip-ml | Dataproc |
|
|
155
|
+
|
|
156
|
+
### Python ML Images
|
|
157
|
+
| Image Name | Source Repo | Type |
|
|
158
|
+
|---|---|---|
|
|
159
|
+
| `semantic-search` | algo.semantic-search-ml + algo.semantic-search-bge-m3-ml | Python ML |
|
|
160
|
+
| `search` | algo.search-ml | Python ML |
|
|
161
|
+
| `tagging` | algo.tagging-ml | Python ML |
|
|
162
|
+
| `gpt` | algo.gpt-ml | Python ML |
|
|
163
|
+
| `image-encoder` | algo.image-encoder | Python ML |
|
|
164
|
+
| `image-classifier` | algo.image-classifier | Python ML |
|
|
165
|
+
| `visual-search` | algo.visual-search | Python ML |
|
|
166
|
+
| `text-encoder` | algo.text-encoder-ml | Python ML |
|
|
167
|
+
| `autocomplete` | algo.autocomplete-ml | Python ML |
|
|
168
|
+
| `segmentation` | algo.segmentation | Python ML |
|
|
169
|
+
| `clip_cp` | algo.clip-ml | Python ML |
|
|
170
|
+
| `sam` | algo.sam / algo.sam3 | Python ML |
|
|
171
|
+
| `yolo_cp` | algo.yolo-world | Python ML |
|
|
172
|
+
| `fm` | algo.fm-ml | Python ML |
|
|
173
|
+
|
|
174
|
+
### Infrastructure Images
|
|
175
|
+
| Image Name | Purpose |
|
|
176
|
+
|---|---|
|
|
177
|
+
| `ebap-ftp-exporter` | Model FTP export |
|
|
178
|
+
| `ebap-fhr-exporter` | Model FHR export |
|
|
179
|
+
| `ebap-model-importer` | Model import |
|
|
180
|
+
| `ebap-activity-monitoring` | Activity monitoring |
|
|
181
|
+
| `ebap-scripts` | GCS copy and utility scripts |
|
|
182
|
+
| `aleph-mapper-mlp` | Aleph data mapping |
|
|
183
|
+
| `aleph-data-feed` | Aleph data feed |
|
|
184
|
+
| `ai-gcp-cleaner` | GCP resource cleanup |
|
|
185
|
+
| `ai-utils` | AI utility operations |
|
|
186
|
+
| `attraqt-gibberish-detector` | Gibberish detection |
|
|
187
|
+
|
|
188
|
+
## Protobuf Services
|
|
189
|
+
|
|
190
|
+
Proto definitions in `protobuf-ml/src/main/protobuf/earlybirds/grpc/`:
|
|
191
|
+
|
|
192
|
+
| Service | Proto File | Domain |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| `algorithms_service` | algo/algorithms/ | Algorithm management |
|
|
195
|
+
| `predictors_service` | predictors/ | Predictor CRUD |
|
|
196
|
+
| `predictor_group_service` | algo/serving/predictor/group/ | Predictor groups |
|
|
197
|
+
| `query_encoding_service` | algo/search/ | Search query encoding |
|
|
198
|
+
| `autocomplete_service` | algo/autocomplete/ | Autocomplete |
|
|
199
|
+
| `features_serving` | algo/features/serving/ | Feature serving |
|
|
200
|
+
| `graph_serving` | algo/graph/serving/ | Graph recommendations |
|
|
201
|
+
| `basic_serving` | algo/basic/serving/ | Basic scoring |
|
|
202
|
+
| `activities_kpi_service` | algo/kpi/activities/ | Activity KPIs |
|
|
203
|
+
| `strategies_kpi_service` | algo/kpi/strategies/ | Strategy KPIs |
|
|
204
|
+
| `model_kpi_service` | algo/kpi/models/ | Model KPIs |
|
|
205
|
+
| `datasources_service` | datasources/ | Data source management |
|
|
206
|
+
| `customscores_service` | customscores/ | Custom scoring |
|
|
207
|
+
| `user_intent_score_service` | algo/pui/ | User intent scoring |
|
|
208
|
+
| `internal_serving_resource_prediction_service` | algo/serving/resource/prediction/ | Resource prediction |
|
|
209
|
+
|
|
210
|
+
## Data Flow Graph
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
LakeFS (rawproducts, rawanalyticsincremental, mappedanalyticsincremental)
|
|
214
|
+
|
|
|
215
|
+
v
|
|
216
|
+
[Dataproc preprocessing] --> GCS (xo-{env}-ai-eu-eb-algo-models/{algo}/preprocessing/)
|
|
217
|
+
|
|
|
218
|
+
v
|
|
219
|
+
[Python ML training] --> MLflow (model registry) --> GCS (model artifacts)
|
|
220
|
+
|
|
|
221
|
+
v
|
|
222
|
+
[Kubeflow pipeline orchestration] --> attraqt-kubeflow-configs (JSON configs)
|
|
223
|
+
| attraqt-kubeflow-pipelines (Python KFP)
|
|
224
|
+
v
|
|
225
|
+
[Model export] --> FTP/FHR exporter --> Production serving (algo.early-birds)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Kubeflow Config Directory Structure {#kubeflow-directories}
|
|
229
|
+
|
|
230
|
+
31 algorithm categories in `attraqt-kubeflow-configs/configs/development/`:
|
|
231
|
+
|
|
232
|
+
| Directory | Algorithm Domain |
|
|
233
|
+
|---|---|
|
|
234
|
+
| `ai/` | Semantic search, item data, image download |
|
|
235
|
+
| `aleph/` | Aleph data feed mapping |
|
|
236
|
+
| `als/` | Alternating Least Squares |
|
|
237
|
+
| `autocomplete/` | Query autocompletion |
|
|
238
|
+
| `basic/` | Basic scoring (popularity, trendiness) |
|
|
239
|
+
| `batch/` | Batch pipeline templates |
|
|
240
|
+
| `clip/` | CLIP vision model pipelines |
|
|
241
|
+
| `computer_vision/` | Image encoding & preprocessing |
|
|
242
|
+
| `content-based/` | Content-based filtering |
|
|
243
|
+
| `fm/` | Factorization Machines |
|
|
244
|
+
| `fp_growth/` | FP-Growth graph algorithms |
|
|
245
|
+
| `gibberish/` | Gibberish detection |
|
|
246
|
+
| `gpt/` | GPT model training/inference |
|
|
247
|
+
| `image_classifier/` | Image classification |
|
|
248
|
+
| `item/` | Item data preprocessing |
|
|
249
|
+
| `item-utils/` | Item utility operations |
|
|
250
|
+
| `lakefs-gc/` | LakeFS garbage collection |
|
|
251
|
+
| `model-utils/` | Model encoding updates/exports |
|
|
252
|
+
| `nlp/` | NLP tokenization |
|
|
253
|
+
| `pass-through/` | Model import/pass-through |
|
|
254
|
+
| `sam3/` | Segment Anything Model |
|
|
255
|
+
| `script/` | Utility scripts (GCS, inference) |
|
|
256
|
+
| `search/` | Semantic search training/encoding |
|
|
257
|
+
| `segmentation/` | Image segmentation |
|
|
258
|
+
| `stl/` | Shop The Look recommendations |
|
|
259
|
+
| `tagging/` | Item tagging/classification |
|
|
260
|
+
| `text-encoder/` | Text encoding models |
|
|
261
|
+
| `visual-search/` | Visual/image search |
|
|
262
|
+
| `yolo/` | YOLO object detection |
|
|
263
|
+
|
|
264
|
+
Production configs: `configs/production/` (ai, kpi categories only)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user wants to plan an implementation, break down a feature into tasks,
|
|
5
|
+
or create a step-by-step development roadmap. Searches codebase first, enforces code
|
|
6
|
+
reuse, checks naming conventions, and produces Red/green TDD-based bite-sized tasks with exact
|
|
7
|
+
file paths and code blocks.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Implementation Planning
|
|
11
|
+
|
|
12
|
+
## Core Principle
|
|
13
|
+
|
|
14
|
+
Every plan must prove that existing code was searched before proposing new code.
|
|
15
|
+
No placeholders. No "TBD." Every task is precise enough for a developer with zero
|
|
16
|
+
context to execute.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### Step 1: Enter Read-Only Exploration
|
|
21
|
+
|
|
22
|
+
Do NOT modify any files during planning. This is a research and design phase only.
|
|
23
|
+
|
|
24
|
+
### Step 2: Search Codebase First
|
|
25
|
+
|
|
26
|
+
**MANDATORY.** Before proposing any implementation:
|
|
27
|
+
|
|
28
|
+
1. Search for existing utilities, scripts, and patterns that do similar things across all team repos.
|
|
29
|
+
2. Check shared libraries explicitly:
|
|
30
|
+
- `earlybirds_commons` - shared utilities and configurations
|
|
31
|
+
- `torch_toolbox` - PyTorch model training/inference utilities
|
|
32
|
+
- `item-toolbox` - e-commerce item data utilities
|
|
33
|
+
- `nlp-toolbox` - text tokenization and NLP utilities
|
|
34
|
+
- `eb_tensorflow` - TensorFlow-based model utilities
|
|
35
|
+
3. Check `attraqt-kubeflow-configs` for existing config patterns.
|
|
36
|
+
4. Check `attraqt-kubeflow-pipelines` for existing pipeline step implementations.
|
|
37
|
+
|
|
38
|
+
Report what you found: "Reusing X from Y" for each piece of existing code that applies.
|
|
39
|
+
|
|
40
|
+
### Step 3: Check Naming Conventions
|
|
41
|
+
|
|
42
|
+
Invoke `ai.pierre:naming-conventions-reviewer` to validate any proposed names:
|
|
43
|
+
- New classes, functions, variables
|
|
44
|
+
- Config keys, strategy IDs
|
|
45
|
+
- Dataset names, GCS paths
|
|
46
|
+
- Docker image names
|
|
47
|
+
|
|
48
|
+
### Step 4: Map Dependencies
|
|
49
|
+
|
|
50
|
+
Identify cross-repo dependencies:
|
|
51
|
+
- Which shared libraries are used and at what version
|
|
52
|
+
- Config inheritance patterns (MongoDB -> Kubeflow config -> pipeline code)
|
|
53
|
+
- Data flow: which repo produces data that another consumes
|
|
54
|
+
- Docker image dependencies
|
|
55
|
+
|
|
56
|
+
### Step 5: Break Into Tasks
|
|
57
|
+
|
|
58
|
+
Each task must be:
|
|
59
|
+
- **2-5 minutes** of work
|
|
60
|
+
- **TDD-based**: write failing test -> implement -> verify -> commit
|
|
61
|
+
- **Vertically sliced**: complete features per task, not horizontal layers
|
|
62
|
+
- **Independently understandable**: a developer can execute this task without reading others
|
|
63
|
+
|
|
64
|
+
### Step 6: Specify Precisely
|
|
65
|
+
|
|
66
|
+
For each task, include:
|
|
67
|
+
- **Exact file paths** to create or modify
|
|
68
|
+
- **Complete code blocks** (not pseudocode, not "add similar logic")
|
|
69
|
+
- **Precise commands** with expected output (e.g., `pytest tests/test_foo.py -v` should show "3 passed")
|
|
70
|
+
- **Verification step**: how to confirm the task is done correctly
|
|
71
|
+
|
|
72
|
+
Forbidden language in tasks:
|
|
73
|
+
- "add appropriate error handling"
|
|
74
|
+
- "implement similar to..."
|
|
75
|
+
- "TBD"
|
|
76
|
+
- "handle edge cases"
|
|
77
|
+
- "add tests as needed"
|
|
78
|
+
|
|
79
|
+
### Step 7: Multi-Repo Awareness
|
|
80
|
+
|
|
81
|
+
If changes span multiple repos:
|
|
82
|
+
- Specify the order of changes (which repo first)
|
|
83
|
+
- Document cross-repo integration points
|
|
84
|
+
- Note version pinning requirements for shared libraries
|
|
85
|
+
- Include integration test steps that verify cross-repo behavior
|
|
86
|
+
|
|
87
|
+
### Step 8: Save Plan
|
|
88
|
+
|
|
89
|
+
Write the plan to `docs/plans/YYYY-MM-DD-<feature-name>.md` in the relevant project repo.
|
|
90
|
+
|
|
91
|
+
Plan document structure:
|
|
92
|
+
```
|
|
93
|
+
# <Feature Name> Implementation Plan
|
|
94
|
+
|
|
95
|
+
## Goal
|
|
96
|
+
<One paragraph>
|
|
97
|
+
|
|
98
|
+
## Architecture
|
|
99
|
+
<Which repos, which components, data flow>
|
|
100
|
+
|
|
101
|
+
## Reuse Summary
|
|
102
|
+
<What existing code is being reused, from which repos>
|
|
103
|
+
|
|
104
|
+
## Net-New Code Summary
|
|
105
|
+
<What new code is being written, and why it does not exist yet>
|
|
106
|
+
|
|
107
|
+
## Prerequisites
|
|
108
|
+
<What must be true before starting>
|
|
109
|
+
|
|
110
|
+
## Tasks
|
|
111
|
+
### Task 1: <title>
|
|
112
|
+
- Files: <exact paths>
|
|
113
|
+
- Test: <failing test to write first>
|
|
114
|
+
- Implementation: <code>
|
|
115
|
+
- Verification: <command + expected output>
|
|
116
|
+
|
|
117
|
+
### Task 2: ...
|
|
118
|
+
|
|
119
|
+
## Post-Implementation
|
|
120
|
+
<Integration testing, deployment steps, monitoring>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Step 9: Self-Review
|
|
124
|
+
|
|
125
|
+
Before presenting the plan, verify:
|
|
126
|
+
- **Spec coverage**: every requirement from the design maps to at least one task
|
|
127
|
+
- **Placeholder scan**: no vague instructions remain
|
|
128
|
+
- **Type consistency**: function signatures match across tasks (caller and callee agree)
|
|
129
|
+
- **Cross-repo alignment**: interface contracts are consistent
|
|
130
|
+
- **Test coverage**: every behavioral change has a corresponding test
|
|
131
|
+
|
|
132
|
+
### Step 10: Present for Approval
|
|
133
|
+
|
|
134
|
+
Show the plan with:
|
|
135
|
+
- Reuse summary ("reusing X from Y")
|
|
136
|
+
- Net-new code summary ("creating X because nothing equivalent exists")
|
|
137
|
+
- Risk areas and mitigation
|
|
138
|
+
- Estimated task count and scope
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-description
|
|
3
|
+
description: >
|
|
4
|
+
Generate a PR description from the current branch diff. Automatically selects
|
|
5
|
+
the light template (bug fix, config, deps, typo) or full template (feature,
|
|
6
|
+
refactor, architecture) based on the change scope. Use when creating a PR or
|
|
7
|
+
when asked to write/generate a PR description.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# PR Description Generator
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. **Gather context.** Run these commands to understand the change:
|
|
15
|
+
- `git log main..HEAD --oneline` (or `develop..HEAD` if `main` does not exist) to list commits
|
|
16
|
+
- `git diff main..HEAD --stat` for file-level summary
|
|
17
|
+
- `git diff main..HEAD` for the full diff
|
|
18
|
+
- Check for a ticket ID in branch name or commit messages (patterns: `XO-\d+`, `EB-\d+`)
|
|
19
|
+
|
|
20
|
+
2. **Classify the change.** Pick a tier:
|
|
21
|
+
- **Light**: single-concern fix, dependency bump, config tweak, typo, CI change, doc update, or any change touching fewer than 4 files with no new public API
|
|
22
|
+
- **Full**: new feature, multi-file refactor, architectural change, new pipeline step, API or data format change, performance optimization with analysis, any change that alters observable system behavior for users or downstream consumers
|
|
23
|
+
|
|
24
|
+
3. **Generate the description.** Follow the template for the selected tier exactly. Do not add sections that are not in the template. Delete optional sections (Scope, Wiring, How to run, Backward compatibility) when they do not apply rather than writing "N/A."
|
|
25
|
+
|
|
26
|
+
## Light template
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## What changed
|
|
30
|
+
|
|
31
|
+
{One or two sentences: what changed and why.}
|
|
32
|
+
|
|
33
|
+
## Notes for reviewer
|
|
34
|
+
|
|
35
|
+
{Anything non-obvious, or "None".}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Full template
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
## Summary
|
|
42
|
+
|
|
43
|
+
{Problem statement and brief summary of the approach. Reference ticket ID if found.
|
|
44
|
+
Explain the motivation and constraints, not the code.}
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
{What is included in this PR.
|
|
49
|
+
Delete this section when the scope is self-evident from the title.}
|
|
50
|
+
|
|
51
|
+
## Behavior
|
|
52
|
+
|
|
53
|
+
{Observable outcomes, not implementation details. Describe what the system
|
|
54
|
+
does differently after this PR in terms a reviewer can verify:
|
|
55
|
+
- Given X, the system now does Y (previously: Z)
|
|
56
|
+
- Config key `foo.bar` controls ... ; default is ...
|
|
57
|
+
For design decisions, state what was chosen and why alternatives were rejected.
|
|
58
|
+
For performance work, include before/after measurements.
|
|
59
|
+
For data model changes, show the before/after schema or format.}
|
|
60
|
+
|
|
61
|
+
## Wiring
|
|
62
|
+
|
|
63
|
+
{How the new code connects to the rest of the system. Which callers, configs,
|
|
64
|
+
or entry points are affected. Delete this section for self-contained changes.}
|
|
65
|
+
|
|
66
|
+
## Tests
|
|
67
|
+
|
|
68
|
+
{How this was tested. List specific test commands and key scenarios.
|
|
69
|
+
If tests are not yet written, state what needs to be tested.}
|
|
70
|
+
|
|
71
|
+
## How to run
|
|
72
|
+
|
|
73
|
+
{Steps to run or test this locally, if applicable.
|
|
74
|
+
Delete this section for changes that don't need manual verification.}
|
|
75
|
+
|
|
76
|
+
## Backward compatibility
|
|
77
|
+
|
|
78
|
+
{Any breaking change to public API, config key, data format, or pipeline interface,
|
|
79
|
+
with migration path. "No breaking changes" if fully compatible.
|
|
80
|
+
Delete this section for internal-only changes.}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Writing rules
|
|
84
|
+
|
|
85
|
+
- **Summary before Behavior.** The first section must explain the problem or motivation, not describe the code.
|
|
86
|
+
- **Behavior, not implementation.** Write "on non-VNNI pods, spin-wait is disabled," not "reads `/proc/cpuinfo` and sets `allow_spinning=0`." The reviewer should understand what changed from the Behavior section alone; the diff shows how.
|
|
87
|
+
- **No commit log rewrites.** Do not copy-paste the commit list. Synthesize.
|
|
88
|
+
- **Be specific.** Name the config keys, endpoints, or interfaces that changed. Avoid vague summaries like "updated logic" or "improved handling."
|
|
89
|
+
- **Keep it scannable.** Use bullet points for lists of 3+ items. Use inline code for identifiers.
|
|
90
|
+
- **Link, do not repeat.** If a ticket or design doc explains the context, link it and summarize in one sentence rather than reproducing it.
|
|
91
|
+
- **No filler.** Every sentence must carry information. Remove "This PR does..." preambles.
|
|
92
|
+
- **Delete optional sections** (Scope, Wiring, How to run, Backward compatibility) when they do not apply, rather than writing "N/A."
|
|
93
|
+
- **Measurements for perf work.** If the change is a performance optimization, include numbers: before/after, methodology, dataset size.
|
|
94
|
+
- **Scope boundaries matter.** When a PR is part of a larger effort, state what is deliberately left out. This prevents review drift and sets expectations for follow-up work.
|