Skip to content

Commit 08dc059

Browse files
feat: update documentation for isolated preview directory usage
- Add .update-preview directory to .gitignore - Update instructions for generating plots to use isolated preview directories
1 parent 89bf29f commit 08dc059

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ nul
226226

227227
# Project-specific
228228
temp/
229+
.update-preview/
229230

230231
# Agentic runs output
231232
agentic/runs/

agentic/commands/update.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ For each updated library, edit `plots/{spec_id}/metadata/{library}.yaml`:
122122
| Field | Value |
123123
|-------------------|---------------------------------------------------------------------------|
124124
| `updated` | Current UTC timestamp in ISO 8601 (e.g., `2026-02-10T14:30:00+00:00`) |
125-
| `generated_by` | `claude-opus-4-6` |
126-
| `python_version` | Get from `python3 --version` |
127-
| `library_version` | Get from `python3 -c "import {library}; print({library}.__version__)"` |
125+
| `generated_by` | Get from `CLAUDE_MODEL` env var, or detect via `claude --version` / model name |
126+
| `python_version` | Get from `uv run python --version` |
127+
| `library_version` | Get from `uv run python -c "import {library}; print({library}.__version__)"` |
128128
| `quality_score` | Set to `null` (CI review will fill this) |
129129
| All other fields | **Keep unchanged** (including `review`, `impl_tags`, `preview_url`, etc.) |
130130

@@ -204,9 +204,7 @@ git add plots/{spec_id}/specification.md
204204
git commit -m "update({spec_id}): {short description}
205205
206206
Updated libraries: {comma-separated list}
207-
{description}
208-
209-
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
207+
{description}"
210208

211209
# Push
212210
git push -u origin implementation/{spec_id}/update
@@ -309,19 +307,17 @@ explain what you changed and why.
309307

310308
### Step 3: Generate Locally
311309

312-
Run the implementation to generate the plot image:
310+
Run the implementation to generate the plot image. **IMPORTANT**: Each agent MUST run in its own isolated preview
311+
directory to avoid race conditions with other parallel agents. All agents write `plot.png` — running in the shared
312+
`implementations/` directory causes file conflicts.
313313

314314
```bash
315315
mkdir -p plots/{SPEC_ID}/implementations/.update-preview/{LIBRARY}
316-
cd plots/{SPEC_ID}/implementations && MPLBACKEND=Agg python3 {LIBRARY}.py
317-
cp plot.png .update-preview/{LIBRARY}/plot.png
316+
cd plots/{SPEC_ID}/implementations/.update-preview/{LIBRARY} && MPLBACKEND=Agg uv run python ../../{LIBRARY}.py
318317
```
319318

320-
For interactive libraries (plotly, bokeh, altair, highcharts, pygal, letsplot), also copy `plot.html` if generated:
321-
322-
```bash
323-
[ -f plot.html ] && cp plot.html .update-preview/{LIBRARY}/plot.html
324-
```
319+
This runs `{LIBRARY}.py` from the isolated `.update-preview/{LIBRARY}/` directory, so `plot.png` and `plot.html` land
320+
there directly — no copy step needed, no race condition with other agents.
325321

326322
If the script fails, read the error, fix the implementation, and retry. **Up to 3 retries.**
327323

0 commit comments

Comments
 (0)