@@ -85,139 +85,23 @@ jobs:
8585 claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
8686 claude_args : " --model opus"
8787 prompt : |
88- ## 🔍 Task: Validate Plot Request and Assign Spec ID
88+ ## Task: Validate Plot Request and Assign Spec ID
8989
90- A new plot request has been submitted. Your job is to:
91- 1. Analyze the request
92- 2. Check for duplicates/similar specs
93- 3. Assign a meaningful spec ID (or flag as duplicate)
90+ Read the rules from `prompts/spec-id-generator.md` and follow them.
9491
9592 ### Issue Details
9693 - **Title:** ${{ github.event.issue.title }}
9794 - **Number:** #${{ github.event.issue.number }}
98-
99- ### Issue Body:
95+ - **Body:**
10096 ```
10197 ${{ github.event.issue.body }}
10298 ```
10399
104- ### Instructions
105-
106- #### Step 1: Read all existing specs
107- - List all files in `specs/` directory (excluding .template.md and VERSIONING.md)
108- - Read each spec file to understand what plots already exist
109- - Pay attention to: Description, Tags, Use Cases
110-
111- #### Step 2: Analyze the request
112- - What type of plot is being requested? (scatter, bar, line, heatmap, etc.)
113- - What variant/feature is being requested? (basic, grouped, stacked, 3d, etc.)
114- - What makes it unique? (regression, animation, interactive, etc.)
115-
116- #### Step 3: Check for duplicates
117- Compare the request against existing specs:
118- - **Exact duplicate**: Same plot type AND same features → Flag as duplicate
119- - **Very similar** (>80% overlap): Same type, minor differences → Suggest existing spec
120- - **Related but different**: Same type, different features → New spec OK
121- - **Completely new**: New plot type → New spec OK
122-
123- #### Step 4: Generate spec ID (if not duplicate)
124-
125- **ID Format:** `{plot-type}-{variant}-{modifier}` (all lowercase, hyphens only)
126-
127- **Rules:**
128- - `plot-type`: The main visualization type (scatter, bar, line, heatmap, histogram, box, violin, pie, area, radar, etc.)
129- - `variant`: The main characteristic (basic, grouped, stacked, horizontal, 3d, multi, etc.)
130- - `modifier`: Optional - additional feature (regression, animated, interactive, annotated, etc.)
131-
132- **Examples:**
133- - Basic scatter plot → `scatter-basic`
134- - Scatter with color mapping → `scatter-color-mapped`
135- - Scatter with linear regression → `scatter-regression-linear`
136- - 3D scatter with rotation → `scatter-3d-interactive`
137- - Grouped bar chart → `bar-grouped`
138- - Horizontal stacked bar → `bar-stacked-horizontal`
139- - Correlation heatmap → `heatmap-correlation`
140- - Annotated heatmap → `heatmap-annotated`
141- - Multi-line time series → `line-timeseries-multi`
142- - Box plot with outliers → `box-outliers-highlighted`
143-
144- **ID must be:**
145- - Unique (not already used)
146- - Descriptive (someone can guess what it does)
147- - Concise (2-3 parts, max 40 characters)
148- - Lowercase with hyphens only
149-
150- #### Step 5: Post comment with result
151-
152- Use `gh issue comment` to post ONE of these responses:
153-
154- **If DUPLICATE:**
155- ```markdown
156- ## 🔄 Duplicate Detected
157-
158- This plot request appears to be a duplicate of an existing spec:
159-
160- **Existing Spec:** `{existing-spec-id}`
161- **File:** `specs/{existing-spec-id}.md`
162-
163- **Similarity:** {brief explanation of why it's a duplicate}
164-
165- Please review the existing spec. If you believe this is different, please update the issue with more details about what makes it unique.
166-
167- ---
168- 🤖 *Generated by [validate-plot-request workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})*
169- ```
170-
171- **If SIMILAR (suggest existing):**
172- ```markdown
173- ## ⚠️ Similar Spec Exists
174-
175- This request is very similar to an existing spec:
176-
177- **Existing Spec:** `{existing-spec-id}`
178- **File:** `specs/{existing-spec-id}.md`
179-
180- **Differences:** {brief explanation}
181-
182- **Options:**
183- 1. Use the existing spec if it meets your needs
184- 2. Update this issue to clarify the unique requirements
185- 3. Consider this a variant of the existing spec
186-
187- ---
188- 🤖 *Generated by [validate-plot-request workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})*
189- ```
190-
191- **If NEW (assign ID):**
192- ```markdown
193- ## ✅ Spec ID Assigned
194-
195- **Assigned ID:** `{new-spec-id}`
196-
197- **Rationale:** {1-2 sentences explaining why this ID was chosen}
198-
199- **Next Steps:**
200- 1. A maintainer will review this request
201- 2. Once approved (label: `approved`), code generation will begin automatically
202- 3. Implementations will be created for matplotlib and seaborn
203-
204- **Spec will be created at:** `specs/{new-spec-id}.md`
205-
206- ---
207- 🤖 *Generated by [validate-plot-request workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})*
208- ```
209-
210- #### Step 6: Update issue title with spec ID (if NEW)
211-
212- After posting the comment, update the issue title to include the spec ID in brackets:
213- - Use: `gh issue edit ${{ github.event.issue.number }} --title "ORIGINAL_TITLE [{new-spec-id}]"`
214- - Example: "Plot: Basic bar chart" → "Plot: Basic bar chart [bar-basic]"
215- - This makes issues searchable by spec ID
100+ ### Process
101+ 1. Read `prompts/spec-id-generator.md` for full instructions
102+ 2. List all existing specs in `specs/` directory
103+ 3. Analyze the request and check for duplicates
104+ 4. Post comment using `gh issue comment ${{ github.event.issue.number }} --body "..."`
105+ 5. If NEW: Update title with `gh issue edit ${{ github.event.issue.number }} --title "..."`
216106
217- ### Important Notes
218- - Do NOT create any files - only analyze and comment
219- - Do NOT add or remove labels
220- - Use `gh issue comment ${{ github.event.issue.number }} --body "..."` to post comment
221- - Use `gh issue edit ${{ github.event.issue.number }} --title "..."` to update title (only for NEW specs)
222- - Be helpful and constructive in feedback
223- - If the request is unclear, ask for clarification in the comment
107+ Workflow URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
0 commit comments