Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/report-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Report Issue
description: Report an issue with an existing plot spec or implementation
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The report-issue.yml template is missing a title field. Unlike spec-update.yml which provides a title template, this template relies on users to create their own titles which may lead to inconsistent issue titles. Consider adding a title field similar to spec-update.yml to ensure consistency, for example: title: "Report Issue: " or title: "[SPEC-ID] ". The workflow will update the title later with the proper format, but having a template helps guide users.

Suggested change
description: Report an issue with an existing plot spec or implementation
description: Report an issue with an existing plot spec or implementation
title: "Report Issue: [SPEC-ID] "

Copilot uses AI. Check for mistakes.
title: "Report: "
labels: ["report-pending"]
body:
- type: markdown
attributes:
value: |
## Report an Issue

Found a problem with an existing plot? Let us know!

Our AI will validate and structure your report, then queue it for maintainer review.

- type: input
id: spec_id
attributes:
label: Specification ID
description: "The spec ID of the affected plot"
placeholder: "e.g., scatter-basic, qrcode-basic, heatmap-correlation"
validations:
required: true

- type: dropdown
id: target
attributes:
label: What has the issue?
description: "Is this an issue with the specification itself or a specific library implementation?"
options:
- Specification (affects all libraries)
- Implementation (specific library)
validations:
required: true

- type: dropdown
id: library
attributes:
label: Library (only for implementation issues)
description: "Which library implementation has the issue? Select N/A for spec issues."
options:
- N/A (spec issue)
- matplotlib
- seaborn
- plotly
- bokeh
- altair
- plotnine
- pygal
- highcharts
- letsplot
validations:
required: false

- type: dropdown
id: category
attributes:
label: Issue Category
description: "What type of issue is this?"
options:
- Visual (ugly, unclear, hard to read)
- Data (unrealistic values, inappropriate context)
- Functional (doesn't work as expected, e.g., QR code not scannable)
- Other
validations:
required: true

- type: textarea
id: description
attributes:
label: Issue Description
description: "Describe the issue. What's wrong? What should it look like instead?"
placeholder: |
Example: The QR code generated looks like a QR code but cannot be scanned by any QR reader app.

Expected: The QR code should be a valid, scannable code that links to the specified URL.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context (optional)
description: "Screenshots, comparison images, or other helpful information"
validations:
required: false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Plot Request
description: Propose a new plot type for pyplots
labels: ["plot-request"]
labels: ["spec-request"]
body:
- type: markdown
attributes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Plot Update
description: Request updates or regeneration of an existing plot
title: "[SPEC-ID] [update] "
labels: ["plot-request", "update"]
labels: ["spec-update"]
body:
- type: markdown
attributes:
Expand Down
164 changes: 164 additions & 0 deletions .github/workflows/report-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: "Report: Validate"
run-name: "Validate Report: ${{ github.event.issue.title }}"

# Validates and structures user-submitted issue reports
# Flow:
# 1. User submits report → report-pending label auto-added
# 2. AI validates spec/impl exists, analyzes issue, posts structured comment
# 3. Labels updated: report-validated + category + report:spec/impl

on:
issues:
types: [labeled]

concurrency:
group: report-validate-${{ github.event.issue.number }}
cancel-in-progress: false

jobs:
validate:
if: github.event.label.name == 'report-pending'
runs-on: ubuntu-latest
permissions:
contents: read
issues: write

steps:
- name: Check if already validated
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Check if already has report-validated label
LABELS=$(gh issue view ${{ github.event.issue.number }} --json labels -q '.labels[].name' | tr '\n' ' ')
if echo "$LABELS" | grep -q "report-validated"; then
echo "::notice::Skipping: Issue already validated"
echo "should_run=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "should_run=true" >> $GITHUB_OUTPUT

- name: Checkout repository
if: steps.check.outputs.should_run == 'true'
uses: actions/checkout@v6

- name: React with eyes emoji
if: steps.check.outputs.should_run == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions \
-f content=eyes

- name: Validate with Claude
if: steps.check.outputs.should_run == 'true'
id: validate
continue-on-error: true
timeout-minutes: 10
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
claude_args: "--model sonnet"
prompt: |
## Task: Validate Issue Report

You are validating a user-submitted issue report for pyplots.

### Issue Details
- **Title:** ${{ github.event.issue.title }}
- **Number:** #${{ github.event.issue.number }}
- **Author:** ${{ github.event.issue.user.login }}
- **Body:**
```
${{ github.event.issue.body }}
```

---

## Instructions

1. **Read the prompt:** `prompts/workflow-prompts/report-analysis.md`

2. **Parse the issue body** to extract:
- spec_id (from "Specification ID" field)
- target (Specification or Implementation)
- library (if implementation)
- category (Visual/Data/Functional/Other)
- description

3. **Validate the spec exists:**
```bash
ls plots/{spec_id}/
```
If NOT found:
- Post comment: "Spec `{spec_id}` not found. Please check the ID."
- Remove `report-pending` label
- Close issue
- STOP

4. **If implementation issue, validate the library exists:**
```bash
ls plots/{spec_id}/implementations/{library}.py
```
If NOT found:
- Post comment: "Implementation `{library}` not found for `{spec_id}`."
- Remove `report-pending` label
- Close issue
- STOP

5. **Read relevant files:**
- `plots/{spec_id}/specification.md`
- `plots/{spec_id}/metadata/{library}.yaml` (if impl issue)

6. **Post structured analysis comment** following the format in the prompt file.

7. **Update issue title:**
```bash
gh issue edit ${{ github.event.issue.number }} --title "[{spec_id}] {brief description}"
```

8. **Update labels:**
```bash
# Remove pending, add validated
gh issue edit ${{ github.event.issue.number }} --remove-label "report-pending" --add-label "report-validated"

# Add target label
gh issue edit ${{ github.event.issue.number }} --add-label "report:spec"
# OR for impl:
gh issue edit ${{ github.event.issue.number }} --add-label "report:impl" --add-label "report:impl:{library}"

# Add category label (map from dropdown value)
# Visual → category:visual
# Data → category:data
# Functional → category:functional
# Other → category:other
gh issue edit ${{ github.event.issue.number }} --add-label "category:{category}"
```

### Important
- Do NOT add the `approved` label
- Do NOT trigger any fixes
- Keep the analysis comment concise but informative

- name: Add reaction on success
if: steps.check.outputs.should_run == 'true' && steps.validate.outcome == 'success'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions \
-f content=rocket

- name: Handle failure
if: steps.check.outputs.should_run == 'true' && steps.validate.outcome == 'failure'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue comment ${{ github.event.issue.number }} --body "## :x: Validation Failed

The AI validation workflow encountered an error. A maintainer will review this manually.

---
:robot: *[report-validate](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})*"

gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions \
-f content=confused
43 changes: 43 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,12 @@ Located in `.github/workflows/`:
| **impl-merge.yml** | `ai-approved` label OR workflow_dispatch | Merges approved PR, creates metadata/{library}.yaml |
| **bulk-generate.yml** | workflow_dispatch only | Dispatches multiple implementations (max 3 parallel) |

### Report Workflows (`report-*.yml`)

| Workflow | Trigger | Purpose |
|----------|---------|---------|
| **report-validate.yml** | `report-pending` label | Validates and structures user-submitted issue reports |

### Workflow Data Flow

**Flow A: New Specification (with approval gate)**
Expand Down Expand Up @@ -674,6 +680,29 @@ impl-review.yml
└── Re-triggers impl-review.yml
```

**Flow C: Report Issue**

```
User submits report issue (from pyplots.ai or GitHub)
▼ (report-pending label auto-added)
report-validate.yml
├── Validates spec/impl exists
├── Reads specification and metadata
├── AI analyzes the issue
├── Posts structured analysis comment
├── Updates title: [{spec-id}] {brief description}
└── Updates labels: report-validated + category:* + report:spec/impl
Issue ready for maintainer review
▼ (maintainer adds `approved` label)
(Fix workflow - future implementation)
```

### Supporting Workflows

| Workflow | Purpose |
Expand Down Expand Up @@ -757,6 +786,20 @@ These are set automatically by `impl-review.yml` after AI evaluation and used by
- **`documentation`** - Documentation improvements
- **`enhancement`** - New feature or improvement

### Report Labels

| Label | Purpose |
|-------|---------|
| `report:spec` | Issue with the specification (affects all libraries) |
| `report:impl` | Issue with a specific implementation |
| `report:impl:{library}` | Specific library affected (e.g., `report:impl:matplotlib`) |
| `category:visual` | Design/visual issues |
| `category:data` | Data quality issues |
| `category:functional` | Non-functional elements |
| `category:other` | Other issues |
| `report-pending` | Report submitted, awaiting AI validation |
| `report-validated` | AI validated, ready for maintainer review |

### New Specification Workflow

1. User creates issue with descriptive title (e.g., "3D scatter plot with rotation animation")
Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,23 @@ pyplots/

We welcome contributions! **All code is AI-generated** - you propose ideas, AI implements them.

**How to contribute**:
**Three ways to contribute** (from [pyplots.ai](https://pyplots.ai) or GitHub):

1. **Propose plot ideas** - Create GitHub Issue with plot description (what you want to visualize)
2. **Improve specs** - Suggest better descriptions for existing plots
3. **Report issues** - Found bugs or quality problems? Open an Issue
4. **Improve docs** - Help others understand the project
| Action | When to Use | From pyplots.ai |
|--------|-------------|-----------------|
| **Suggest Spec** | Propose a new plot type | "suggest spec" link in catalog |
| **Report Spec Issue** | Problem with a specification | "report issue" link on spec page |
| **Report Impl Issue** | Problem with a library implementation | "report issue" link on impl page |

**The workflow**:
**How it works**:

1. You create Issue with plot idea + add `spec-request` label
2. AI generates spec, creates feature branch
3. Maintainer reviews and adds `approved` label
4. 9 library implementations generate in parallel (tracked via live status table)
5. AI quality review per library (≥ 90 instant, < 90 repair loop, ≥ 50 final threshold)
6. Auto-merge to feature branch, then to main
1. You create Issue (or click link on pyplots.ai)
2. AI validates and processes your input
3. Maintainer reviews and approves
4. AI generates/fixes the code
5. Automated quality review ensures excellence

**Important**: Don't submit code directly! If a plot has quality issues, it means the spec needs improvement, not the
code.
**Important**: Don't submit code directly! If a plot has quality issues, it means the spec needs improvement, not the code.

See [contributing.md](docs/contributing.md) for details.

Expand Down Expand Up @@ -167,6 +166,6 @@ MIT License - see [LICENSE](LICENSE) file for details.

**Built by [Markus Neusinger](https://linkedin.com/in/markus-neusinger/)**

[⭐ Star us on GitHub](https://github.com/MarkusNeusinger/pyplots) • [🐛 Report Bug](https://github.com/MarkusNeusinger/pyplots/issues) • [💡 Request Feature](https://github.com/MarkusNeusinger/pyplots/issues)
[⭐ Star us on GitHub](https://github.com/MarkusNeusinger/pyplots) • [💡 Suggest Spec](https://github.com/MarkusNeusinger/pyplots/issues/new?template=spec-request.yml) • [🐛 Report Issue](https://github.com/MarkusNeusinger/pyplots/issues/new?template=report-issue.yml)

</div>
Loading
Loading