You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4a85559
Browse filesBrowse the repository at this point in the historyBrowse files
Add R refactoring skill and journal figure specifications documentation
- Created a new documentation file for the optional R refactoring skill, detailing the process to refactor R scripts into the lab format with clear organization and emoji section comments.
- Introduced a new reference document outlining fictional journal figure specifications, including detailed requirements for figure formatting, accessibility, and behavior verification.
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,26 @@
1
1
# Practical GenAI Agentic Coding Guide
2
2
3
-
**[Read the online guide](https://fritschelab.org/practical-genai-agentic-coding-guide/).** Choose [Python](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/paths/python/) or [R](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/paths/r/), then follow six lessons through one reporting change, verification, review, and a short handoff.
3
+
**[Read the online guide](https://fritschelab.org/practical-genai-agentic-coding-guide/).** Choose [Python](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/paths/python/) or [R](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/paths/r/), then repair a plot with a coding agent in six lessons.
4
4
5
5
This is Part 2 of the [Practical GenAI series](https://fritschelab.org/practical-genai-coding-guide/), from [Lars G. Fritsche](https://medschool.umich.edu/profile/4980/lars-fritsche) and the [Fritsche Lab](https://fritschelab.org/) at the University of Michigan.
6
6
7
7
## Get the exercise
8
8
9
-
The runnable Python/R pipeline, synthetic data, tests, and agent instructions are in the **[example repository](https://github.com/FritscheLab/practical-genai-agentic-coding-example)**. Download only that repository and follow along online. It also includes the language walkthroughs for offline use.
9
+
Download the **[example repository](https://github.com/FritscheLab/practical-genai-agentic-coding-example)** for code, invented totals, tests, and offline lessons. Follow the website alongside it.
Start with its README and your chosen language's setup. You should be comfortable running a Python or R script and using a terminal; the lessons explain the Git steps. The baseline uses synthetic data and needs no model API or credentials. Use an institution-approved coding assistant for the agent exercise.
16
+
Start with its README and language setup. Bring basic Python/R and terminal skills; the lessons explain Git. Plotting needs no model API or credentials. Use an institution-approved coding assistant for the agent exercise.
17
+
18
+
Include accessibility in every figure: contrast, readable labels, and reviewed alternative text.
17
19
18
20
## Explore the guide
19
21
20
22
-[Agent setup](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/platforms/): configure your coding client and check its access.
23
+
-[Optional R refactoring example](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/platforms/r-refactoring.html): reuse a lab formatting skill or named Codex agent, then verify that results stay the same.
21
24
-[Repository practices](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/practices/): context, testing, logs, and handoffs.
22
25
-[Teaching materials](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/lab_meeting/): a 45-minute workshop and slides.
23
26
-[Lab data guidance](https://fritschelab.org/practical-genai-agentic-coding-guide/docs/reference/lab-data-policy.html): institutional requirements before adapting the workflow to study data.
Copy file name to clipboardExpand all lines: docs/lab_meeting/45min_runbook.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,41 +5,45 @@ parent: Teaching
5
5
nav_order: 1
6
6
---
7
7
8
-
# A small change, from request to handoff
8
+
# Repair a plot, from request to handoff
9
9
10
10
## Prepare
11
11
12
-
Have participants keep the guide open online and download the [example repository](https://github.com/FritscheLab/practical-genai-agentic-coding-example). Choose the [Python path](../paths/python/index.md) or [R path](../paths/r/index.md). Run its setup, tests, and six-row example before the presentation. Prepare an approved [coding client](../platforms/index.md). Use synthetic files throughout.
12
+
Before the session, participants download the [example](https://github.com/FritscheLab/practical-genai-agentic-coding-example), complete [Python](../paths/python/index.md) or [R setup](../paths/r/index.md), and prepare an approved [coding client](../platforms/index.md). Run tests and save `runs/baseline/summary.png`.
13
13
14
-
Open the [six-row example and expected report](../lessons/02-specify.md). Find measurements d, e, and f in the input and `outputs/flagged_rows.tsv` so you can help participants check their counts.
14
+
Open the [exercise and target](../lessons/02-specify.md): two invented groups overlap and long labels are clipped. The task repairs that layout for a fictional journal.
15
+
16
+
Keep study data and logs outside this teaching workspace.
15
17
16
18
## Follow along
17
19
18
20
| Minutes | Activity |
19
21
| --- | --- |
20
-
| 0–5 | Open the six input rows and baseline output. Find the three excluded measurements. |
21
-
| 5–12 | Ask the agent to explain where cleaning and reporting happen. Check the files it names. |
22
-
| 12–17 |Show the desired report: 3 of 6 excluded, missing height 2, missing weight 2. Explain the overlap. |
23
-
| 17–30 | Use the chosen path's implementation prompt. Watch the change and ask about anything unclear. |
24
-
| 30–40 |Run the example and existing tests. Read the summary and inspect the diff. |
22
+
| 0–5 | Open the baseline plot. Identify overlapping groups and clipped labels. |
23
+
| 5–12 | Ask the agent to explain the plotting functions, layout settings, and tests. Check the source files it names. |
24
+
| 12–17 |Compare the baseline with the target. Read the fictional JUSF specifications: grouped bars, exact dimensions, typewriter text, purple/lime groups, legend, and value labels. |
25
+
| 17–30 | Use the chosen path's implementation prompt. Watch the source change and ask about anything unclear. |
26
+
| 30–40 |Render the repaired PNG, run both checks, review contrast and grayscale readability, and write/review `runs/with-fix/summary.alt.txt`. |
25
27
| 40–45 | Write a short handoff: what changed, what was checked, and what remains. |
26
28
27
29
## The example
28
30
29
-
The [six-row table](../lessons/02-specify.md) fits on one screen. Measurements d/e/f are excluded; f lacks both height and weight. The task adds a readable summary of these existing decisions. Cleaning and record selection stay the same.
31
+
The [exercise table](../lessons/02-specify.md) fixes the values; the [figure specifications](../reference/figure-specifications.md) fix the format. Point the agent there.
32
+
30
33
31
-
Use the complete-data file next. Its report should show no exclusions. Different wording and code can produce the same useful result.
32
34
33
35
## During the change
34
36
35
-
Use the prompts in the participant's language path. Ask for an explanation before edits, a short plan if needed, and implementation once the request is clear. Check the client's actual file and command permissions separately.
37
+
Use your language path's prompts. Ask about source and tests before edits; plan only if needed. Check actual file and command permissions.
38
+
39
+
Behavior tests should pass before and after; the strict figure checker should fail before and pass after. Open the image and diff too. If the agent cannot view images, a person performs that check.
36
40
37
-
Existing tests help catch regressions. Reading the report checks whether the improvement makes sense. Reviewing the diff checks whether the agent changed more than requested. These are complementary habits learners can reuse in their own repositories.
41
+
Review contrast, grayscale readability, and `runs/with-fix/summary.alt.txt` against the figure specification. The plotting CLI does not create alt text.
38
42
39
43
## If time runs short
40
44
41
-
Save the current state and any failing command. Use the [expected report](../lessons/02-specify.md#describe-the-improvement) and the flagged rows to discuss what remains, and leave a short handoff so participants can continue at home.
45
+
Save the source, latest image, commands, and unfinished work. Participants can continue from that handoff at home.
42
46
43
47
## Debrief
44
48
45
-
What did you check yourself? What did the agent help you find? What would a labmate need to continue this work tomorrow?
49
+
What did the tests establish? What did opening the image reveal? Could a labmate reproduce the edited plot from the handoff?
Copy file name to clipboardExpand all lines: docs/lab_meeting/demo_prompts.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,33 @@ nav_order: 2
7
7
8
8
# Prompts for the workshop
9
9
10
-
Send participants to their language path at the start. Each lesson already supplies a copyable prompt with that language and its files filled in. Participants can keep using Next to follow the exercise.
10
+
Use your language path's prompts; they already name the right source files and checks.
| Hand off |[Python Lesson 6](../paths/python/06-handoff.md)|[R Lesson 6](../paths/r/06-handoff.md)|
19
20
20
-
Use planning while the group still has questions about the approach. Discuss the six-row example and the report, then switch to implementation. Keep the [shared example](../lessons/02-specify.md) available to the facilitator.
21
+
Open the baseline and [figure specifications](../reference/figure-specifications.md). Plan only while the approach is unclear, then implement.
21
22
22
-
A handoff request can be shared across languages:
23
+
Short prompts work because `AGENTS.md`, the skill, and the specification carry the reusable instructions. Point to those files instead of repeating their contents.
23
24
24
-
```markdown
25
-
Leave a short handoff: what changed, the commands and results we checked,
26
-
and anything unfinished. Include how to rerun the example.
25
+
If alt text is still missing, ask:
26
+
27
+
```text
28
+
Write runs/with-fix/summary.alt.txt following the journal specification.
29
+
Check it against the image and report any accessibility checks you cannot do.
30
+
```
31
+
32
+
Review the draft yourself. Alt text is a separate deliverable; rendering creates only the PNG.
33
+
34
+
For the handoff:
35
+
36
+
```text
37
+
Write a short handoff with the changes, actual checks and results,
38
+
image and alt-text paths, and anything unfinished or untested.
Copy file name to clipboardExpand all lines: docs/lab_meeting/index.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,16 @@ has_children: true
6
6
has_toc: false
7
7
---
8
8
9
-
# Work through a change together
9
+
# Repair a plot together
10
10
11
-
The [45-minute runbook](45min_runbook.md) is a session you can lead with your group. Use the [six short steps](../lessons/index.md) to follow along or continue at home. Choose the Python or R path, install its dependencies, and run its baseline before the session; use the meeting for reasoning and review.
11
+
The [45-minute runbook](45min_runbook.md) is a session you can lead with your group. Use the [six short steps](../lessons/index.md) to follow along or continue at home. Choose Python or R, install its dependencies, and render the baseline before the session; use the meeting for reasoning and review.
12
+
13
+
Participants and agents work with a plotting function, invented totals for two groups, rendered images, tests, and local [figure specifications](../reference/figure-specifications.md). The task separates overlapping bars and fixes clipped labels without changing the totals.
12
14
13
15
-[Runbook](45min_runbook.md): agenda, preparation, and checkpoints.
14
-
-[Demo prompts](demo_prompts.md): concise requests for orientation, implementation, and review.
15
-
-[Six-row example](../lessons/02-specify.md): inputs, expected report, and checks for either language.
16
+
-[Demo prompts](demo_prompts.md): requests for orientation, implementation, and review.
17
+
-[Plot-repair exercise](../lessons/02-specify.md): baseline, target, and checks for either language.
16
18
17
19
To present the [Quarto slides](https://github.com/FritscheLab/practical-genai-agentic-coding-guide/blob/main/docs/lab_meeting/slide_deck.qmd), run `quarto render docs/lab_meeting/slide_deck.qmd` from a local copy of the [guide repository](https://github.com/FritscheLab/practical-genai-agentic-coding-guide) and open the resulting HTML file. Participants only need the example repository; the guide source is for presenting or editing the slides.
18
20
19
-
Participants should leave with a reporting change they understand, test results, and a short handoff they can use to continue at home.
21
+
Participants should leave with a readable plot, reviewed alternative text, a source change they understand, test results, and a short handoff. Accessibility is part of the task and review from the start.
0 commit comments