Course Lab Figure Evidence
Overview
Turn matched experiment-image sources into staged figure artifacts and placement decisions for an already assembled report draft without drifting into non-figure prose, plotting, or final QC decisions.
This skill owns experiment picture-result staging, signatory-page staging, and report-facing evidence planning. It is standalone with local copied tools, so it should not reach back into the old parent report-skill folder.
When late-stage comparison artifacts exist, this skill should stage the paired simulation image assets and group them with the matching observed case evidence rather than planning only experiment-side photos.
Standalone Tool Contract
Use Independently When
- A staged report draft or evidence-planning target already exists and matched picture-result or signatory sources are known.
- The caller needs picture-result staging, signatory-page staging, evidence-plan artifacts, or late figure placement guidance.
- Paired observed/simulation comparison cases should be grouped from an explicit final-staging summary.
- The task is figure/evidence focused and should not rewrite non-figure prose or take over final compile/QC decisions.
course-lab-final-staging already produced the staged draft, and course-lab-experiment-principle already owns handout-derived theory images for the early theory-facing sections.
Minimum Inputs
- For picture-result staging: a matched
--source-root, an --output-dir, and an --output-json manifest path.
- For evidence planning: a
--manifest-json, an --output-json, and an --output-markdown.
- For signatory staging: a matched signatory
--source-root, an output directory, an output manifest path, and an output TeX snippet path.
- For direct late TeX mutation, an explicitly identified staged draft or canonical TeX target plus a validated evidence plan; artifact-only staging does not require TeX mutation authority.
- When pairing observed/simulation cases, an explicit
--comparison-cases-json such as final_staging_summary.json.
Optional Workflow Inputs
- Final-staging summary fields that name safe result/discussion neighborhoods and normalized
comparison_cases.
- Discovery notes identifying representative picture-result folders and signatory-page folders.
- Image-size measurements used to decide whether
$compress-png should run before final QC.
- Existing placement notes or
\NeedsInput{...} markers from earlier figure attempts.
Procedure
- Use only local scripts in
/root/.codex/skills/course-lab-figure-evidence/scripts/.
- Stage picture results and same-case comparison assets before planning placement.
- Build the evidence plan from the manifest, then use that plan to decide any late figure TeX insertion.
- Keep low-confidence grouping, missing captions, oversized images, and representative-subset choices visible.
- Keep captions report-facing and avoid internal provenance wording such as
source archive, staged evidence set, source label, metadata, or evidence pool.
Outputs
picture_results_manifest.json and staged image assets under the caller-provided output directory.
picture_evidence_plan.json and picture_evidence_plan.md.
- Optional
signatory_pages_manifest.json, signatory_pages.tex, and staged signatory images.
- Optional TeX figure insertions or visible
\NeedsInput{...} placeholders when late placement is explicitly requested and safe.
- Compression guidance when the staged image pool threatens the
15 MB coordination target.
Validation
- Manifests refer only to staged local assets and preserve sequence/case grouping warnings.
- Evidence-plan Markdown is suitable for report-facing placement review and does not masquerade as interpretation prose.
- Any TeX mutation is limited to figure blocks near existing final-staging content and does not rewrite non-figure sections.
- Captions avoid internal workflow/provenance language and use file-name stems or handout-grounded descriptions when formal captions are missing.
- Local figure-evidence staging, planning, and signatory tests pass.
Failure / Reroute Signals
- Missing picture-result or signatory source roots: stop in standalone mode with the missing path; in full-report mode, return a reroute hint to source discovery.
- Ambiguous grouping or subsection mapping: emit warnings and
\NeedsInput{...} placeholders instead of forcing a placement.
- Missing or malformed comparison-case summary: continue with observed-only staging when safe and record the pairing gap.
- PNG pool still too large after same-format compression attempts: ask for explicit user confirmation before converting to another format.
Non-Ownership
- This tool does not choose the experiment, decode handouts, transfer raw data, compute uncertainties, write interpretation prose, synthesize discussion prose, or make final compile/QC decisions.
- This tool does not reclaim handout-derived theory images already owned by
course-lab-experiment-principle.
- This tool does not convert PNG assets to JPEG or another format without explicit user confirmation.
Optional Workflow Metadata
- Suggested future role label:
writer.
- Typical upstream tools:
course-lab-final-staging, course-lab-discovery, course-lab-experiment-principle.
- Typical downstream tools:
course-lab-finalize-qc, $compress-png when same-format PNG compression is needed.
Workflow Notes
- Use local
scripts/stage_picture_results.py to copy experiment picture results into the report workspace and emit picture_results_manifest.json.
- Use local
scripts/plan_picture_evidence.py to convert the manifest into picture_evidence_plan.json and picture_evidence_plan.md.
- Use local
scripts/stage_signatory_pages.py to stage signed record sheets and emit both a manifest and a LaTeX snippet.
- When
course-lab-final-staging emitted normalized comparison_cases, pass that artifact into stage_picture_results.py so simulation images are staged into the report workspace and can be paired with same-case observed images.
- Keep signatory-page layouts footer-safe: bound the staged page height so two-row appendix blocks stay inside the printable area, and use normal subfigure captions so
(a), (b), (c) markers remain visible.
- Treat handout-derived theory images for
Introduction, nearby Background, and Experiment Principle as already owned by course-lab-experiment-principle.
- Treat the staged draft from
course-lab-final-staging as the main upstream report-writing input for figure placement decisions.
- Support late picture placement into that staged draft by using the staged assets, manifests, and evidence plan to decide where local figure blocks belong.
- Keep evidence planning focused on improving placement quality after final staging. It does not replace interpretation work or final QC.
- Keep grouping uncertainty visible. If figure grouping is not secure, emit a visible
\NeedsInput{...} placeholder instead of guessing.
- Keep figure captions and nearby placement notes human-sounding. Do not use provenance or workflow wording such as
source archive, staged evidence set, source label, metadata, or evidence pool in the report.
- When the handout does not supply a formal caption, refer to a picture by its file name stem or a handout-grounded description instead of exposing internal staging language.
- Use
15 MB as a late-stage coordination target for image handling, and surface compression guidance early enough that course-lab-finalize-qc still owns the final compile-and-QC decision.
- Use
$compress-png when staged PNG assets threaten that coordination target, but keep the figure-evidence toolchain local to this folder.
- Do not switch staged images to another format unless it is truly necessary. Prefer staying in the original format, especially PNG.
- Do not switch PNG assets to JPEG or another format without asking the user for confirmation first.
Primary Commands
Stage experiment picture results:
python3 /root/.codex/skills/course-lab-figure-evidence/scripts/stage_picture_results.py \
--source-root "/path/to/AI_works/resources/experiment_pic_results/<matched-folder>" \
--comparison-cases-json "/path/to/results/<experiment>/final_staging_summary.json" \
--output-dir "/path/to/results/<experiment>/picture-results" \
--output-json "/path/to/results/<experiment>/picture_results_manifest.json"
Plan report-facing picture evidence:
python3 /root/.codex/skills/course-lab-figure-evidence/scripts/plan_picture_evidence.py \
--manifest-json "/path/to/results/<experiment>/picture_results_manifest.json" \
--output-json "/path/to/results/<experiment>/picture_evidence_plan.json" \
--output-markdown "/path/to/results/<experiment>/picture_evidence_plan.md"
Stage signatory pages:
python3 /root/.codex/skills/course-lab-figure-evidence/scripts/stage_signatory_pages.py \
--source-root "/path/to/AI_works/resources/experiment_signatory/<matched-folder>" \
--output-dir "/path/to/results/<experiment>/signatory-pages" \
--output-json "/path/to/results/<experiment>/signatory_pages_manifest.json" \
--output-tex "/path/to/results/<experiment>/signatory_pages.tex"
Workflow
- Confirm that
course-lab-final-staging has already assembled the staged draft and that this draft is the main upstream input for figure placement.
- Confirm that discovery already identified the picture-result directory and any signatory-page directory.
- Assume
course-lab-experiment-principle already handled handout-derived theory figures for the early theory-facing sections.
- Run
stage_picture_results.py on the matched experiment picture-result directory.
- If
course-lab-final-staging emitted normalized comparison_cases, pass that summary JSON to stage_picture_results.py so same-case simulation images are copied into picture-results/comparison-cases/.
- Convert
picture_results_manifest.json into picture_evidence_plan.json and picture_evidence_plan.md with plan_picture_evidence.py.
- If signed record sheets exist, run
stage_signatory_pages.py and keep the emitted LaTeX snippet separate from the scientific results figures.
- Use the staged draft as the placement surface and apply late picture placement near the already assembled figure-relevant content without rewriting non-figure prose.
- Review grouping warnings, unmapped evidence units, and representative-subset choices before finalizing late picture placement.
- Prefer same-case paired comparison units when both observed and simulation assets are available, placing experiment and simulation pictures together rather than in disconnected figure groups.
- If the staged raster-image pool looks heavy against the
15 MB coordination target, invoke $compress-png before handing off to course-lab-finalize-qc.
- Keep compression in the same image format unless that still cannot get the asset pool under control.
- If cross-format conversion looks necessary after same-format compression attempts, ask the user for confirmation first and wait before converting anything.
Quick Reference
| Situation |
Action |
course-lab-final-staging already produced the staged draft |
Use that staged draft as the upstream placement surface for late picture placement |
Handout-derived theory images were already placed by course-lab-experiment-principle |
Leave them alone and focus on late experiment evidence |
| Matched experiment photo folder is known |
Run stage_picture_results.py |
| Serial-numbered files show a process sequence |
Preserve the ordered sequence group in the manifest and evidence plan |
| Result-picture groups must map into report subsections late in the run |
Run plan_picture_evidence.py to improve placement quality after final staging |
| Signatory sheets exist |
Run stage_signatory_pages.py |
| PNG assets are inflating the image pool |
Invoke $compress-png, keep PNG output if possible, and treat 15 MB as a coordination target for late-stage handoff |
| Same-format compression still looks insufficient |
Ask the user for confirmation first before converting to another format |
Boundary Rules
- This skill starts only after source discovery and
course-lab-final-staging are settled.
- This skill owns staging, grouping, evidence-plan artifacts, and late picture placement.
- This skill does not own handout-derived theory images already placed by
course-lab-experiment-principle.
- This skill does not own non-figure prose writing.
- This skill does not own final compile or QC decisions.
- This skill does not own interpretation prose or discussion synthesis.
- Keep parent-skill path dependencies out of the workflow. Use the copied local scripts in this folder instead of the old parent report-skill folder.
- Preserve low-confidence mapping as warnings and placeholders instead of silently forcing a subsection or caption.
- Do not let captions or placement notes sound like workflow logs. Prefer neutral lab-report naming based on the file name stem or the handout description.
- Do not fold signatory pages into the scientific results discussion.
- Prefer same-format compression first. Do not switch staged images to another format unless necessary, and ask the user for confirmation first before any such conversion.
Common Mistakes
- Reaching back into the old parent report-skill folder instead of using the copied local scripts.
- Treating the evidence plan as final interpretation prose or as a substitute for final QC instead of a late-stage placement contract.
- Reclaiming handout-derived theory images that were already owned by
course-lab-experiment-principle.
- Guessing through ambiguous figure grouping instead of surfacing a visible question.
- Treating image-size guidance as if this skill owns the final compile-and-QC decision.
- Letting signatory-page captions drift into the footer by widening portrait scans without a height cap.
- Writing captions with provenance wording such as
source archive, staged evidence set, source label, metadata, or evidence pool.
- Converting PNG assets to JPEG immediately instead of trying same-format compression first and getting user confirmation before any format switch.
Resources
scripts/common.py: local helper module copied for standalone use
scripts/stage_picture_results.py: local picture-result staging tool
scripts/plan_picture_evidence.py: local evidence-plan builder
scripts/stage_signatory_pages.py: local signatory-page staging tool
tests/test_skill_package.py: local standalone packaging checks
tests/test_stage_picture_results.py: local regression tests for picture-result staging
tests/test_plan_picture_evidence.py: local regression tests for evidence planning
tests/test_stage_signatory_pages.py: local regression tests for signatory-page staging
1---2name: course-lab-figure-evidence3description: Use when a course lab-report run already has a staged draft from course-lab-final-staging plus matched picture-result or signatory sources, and now needs picture-result grouping, evidence-plan artifacts, or late picture placement into the assembled draft.4---56# Course Lab Figure Evidence78## Overview910Turn matched experiment-image sources into staged figure artifacts and placement decisions for an already assembled report draft without drifting into non-figure prose, plotting, or final QC decisions.1112This skill owns experiment picture-result staging, signatory-page staging, and report-facing evidence planning. It is standalone with local copied tools, so it should not reach back into the old parent report-skill folder.1314When late-stage comparison artifacts exist, this skill should stage the paired simulation image assets and group them with the matching observed case evidence rather than planning only experiment-side photos.1516## Standalone Tool Contract1718### Use Independently When1920- A staged report draft or evidence-planning target already exists and matched picture-result or signatory sources are known.21- The caller needs picture-result staging, signatory-page staging, evidence-plan artifacts, or late figure placement guidance.22- Paired observed/simulation comparison cases should be grouped from an explicit final-staging summary.23- The task is figure/evidence focused and should not rewrite non-figure prose or take over final compile/QC decisions.24- `course-lab-final-staging` already produced the staged draft, and `course-lab-experiment-principle` already owns handout-derived theory images for the early theory-facing sections.2526### Minimum Inputs2728- For picture-result staging: a matched `--source-root`, an `--output-dir`, and an `--output-json` manifest path.29- For evidence planning: a `--manifest-json`, an `--output-json`, and an `--output-markdown`.30- For signatory staging: a matched signatory `--source-root`, an output directory, an output manifest path, and an output TeX snippet path.31- For direct late TeX mutation, an explicitly identified staged draft or canonical TeX target plus a validated evidence plan; artifact-only staging does not require TeX mutation authority.32- When pairing observed/simulation cases, an explicit `--comparison-cases-json` such as `final_staging_summary.json`.3334### Optional Workflow Inputs3536- Final-staging summary fields that name safe result/discussion neighborhoods and normalized `comparison_cases`.37- Discovery notes identifying representative picture-result folders and signatory-page folders.38- Image-size measurements used to decide whether `$compress-png` should run before final QC.39- Existing placement notes or `\NeedsInput{...}` markers from earlier figure attempts.4041### Procedure4243- Use only local scripts in `/root/.codex/skills/course-lab-figure-evidence/scripts/`.44- Stage picture results and same-case comparison assets before planning placement.45- Build the evidence plan from the manifest, then use that plan to decide any late figure TeX insertion.46- Keep low-confidence grouping, missing captions, oversized images, and representative-subset choices visible.47- Keep captions report-facing and avoid internal provenance wording such as `source archive`, `staged evidence set`, `source label`, `metadata`, or `evidence pool`.4849### Outputs5051- `picture_results_manifest.json` and staged image assets under the caller-provided output directory.52- `picture_evidence_plan.json` and `picture_evidence_plan.md`.53- Optional `signatory_pages_manifest.json`, `signatory_pages.tex`, and staged signatory images.54- Optional TeX figure insertions or visible `\NeedsInput{...}` placeholders when late placement is explicitly requested and safe.55- Compression guidance when the staged image pool threatens the `15 MB` coordination target.5657### Validation5859- Manifests refer only to staged local assets and preserve sequence/case grouping warnings.60- Evidence-plan Markdown is suitable for report-facing placement review and does not masquerade as interpretation prose.61- Any TeX mutation is limited to figure blocks near existing final-staging content and does not rewrite non-figure sections.62- Captions avoid internal workflow/provenance language and use file-name stems or handout-grounded descriptions when formal captions are missing.63- Local figure-evidence staging, planning, and signatory tests pass.6465### Failure / Reroute Signals6667- Missing picture-result or signatory source roots: stop in standalone mode with the missing path; in full-report mode, return a reroute hint to source discovery.68- Ambiguous grouping or subsection mapping: emit warnings and `\NeedsInput{...}` placeholders instead of forcing a placement.69- Missing or malformed comparison-case summary: continue with observed-only staging when safe and record the pairing gap.70- PNG pool still too large after same-format compression attempts: ask for explicit user confirmation before converting to another format.7172### Non-Ownership7374- This tool does not choose the experiment, decode handouts, transfer raw data, compute uncertainties, write interpretation prose, synthesize discussion prose, or make final compile/QC decisions.75- This tool does not reclaim handout-derived theory images already owned by `course-lab-experiment-principle`.76- This tool does not convert PNG assets to JPEG or another format without explicit user confirmation.7778## Optional Workflow Metadata7980- Suggested future role label: `writer`.81- Typical upstream tools: `course-lab-final-staging`, `course-lab-discovery`, `course-lab-experiment-principle`.82- Typical downstream tools: `course-lab-finalize-qc`, `$compress-png` when same-format PNG compression is needed.8384## Workflow Notes8586- Use local `scripts/stage_picture_results.py` to copy experiment picture results into the report workspace and emit `picture_results_manifest.json`.87- Use local `scripts/plan_picture_evidence.py` to convert the manifest into `picture_evidence_plan.json` and `picture_evidence_plan.md`.88- Use local `scripts/stage_signatory_pages.py` to stage signed record sheets and emit both a manifest and a LaTeX snippet.89- When `course-lab-final-staging` emitted normalized `comparison_cases`, pass that artifact into `stage_picture_results.py` so simulation images are staged into the report workspace and can be paired with same-case observed images.90- Keep signatory-page layouts footer-safe: bound the staged page height so two-row appendix blocks stay inside the printable area, and use normal subfigure captions so `(a)`, `(b)`, `(c)` markers remain visible.91- Treat handout-derived theory images for `Introduction`, nearby `Background`, and `Experiment Principle` as already owned by `course-lab-experiment-principle`.92- Treat the staged draft from `course-lab-final-staging` as the main upstream report-writing input for figure placement decisions.93- Support late picture placement into that staged draft by using the staged assets, manifests, and evidence plan to decide where local figure blocks belong.94- Keep evidence planning focused on improving placement quality after final staging. It does not replace interpretation work or final QC.95- Keep grouping uncertainty visible. If figure grouping is not secure, emit a visible `\NeedsInput{...}` placeholder instead of guessing.96- Keep figure captions and nearby placement notes human-sounding. Do not use provenance or workflow wording such as `source archive`, `staged evidence set`, `source label`, `metadata`, or `evidence pool` in the report.97- When the handout does not supply a formal caption, refer to a picture by its file name stem or a handout-grounded description instead of exposing internal staging language.98- Use `15 MB` as a late-stage coordination target for image handling, and surface compression guidance early enough that `course-lab-finalize-qc` still owns the final compile-and-QC decision.99- Use `$compress-png` when staged PNG assets threaten that coordination target, but keep the figure-evidence toolchain local to this folder.100- Do not switch staged images to another format unless it is truly necessary. Prefer staying in the original format, especially PNG.101- Do not switch PNG assets to JPEG or another format without asking the user for confirmation first.102103## Primary Commands104105Stage experiment picture results:106107```bash108python3 /root/.codex/skills/course-lab-figure-evidence/scripts/stage_picture_results.py \109 --source-root "/path/to/AI_works/resources/experiment_pic_results/<matched-folder>" \110 --comparison-cases-json "/path/to/results/<experiment>/final_staging_summary.json" \111 --output-dir "/path/to/results/<experiment>/picture-results" \112 --output-json "/path/to/results/<experiment>/picture_results_manifest.json"113```114115Plan report-facing picture evidence:116117```bash118python3 /root/.codex/skills/course-lab-figure-evidence/scripts/plan_picture_evidence.py \119 --manifest-json "/path/to/results/<experiment>/picture_results_manifest.json" \120 --output-json "/path/to/results/<experiment>/picture_evidence_plan.json" \121 --output-markdown "/path/to/results/<experiment>/picture_evidence_plan.md"122```123124Stage signatory pages:125126```bash127python3 /root/.codex/skills/course-lab-figure-evidence/scripts/stage_signatory_pages.py \128 --source-root "/path/to/AI_works/resources/experiment_signatory/<matched-folder>" \129 --output-dir "/path/to/results/<experiment>/signatory-pages" \130 --output-json "/path/to/results/<experiment>/signatory_pages_manifest.json" \131 --output-tex "/path/to/results/<experiment>/signatory_pages.tex"132```133134## Workflow1351361. Confirm that `course-lab-final-staging` has already assembled the staged draft and that this draft is the main upstream input for figure placement.1372. Confirm that discovery already identified the picture-result directory and any signatory-page directory.1383. Assume `course-lab-experiment-principle` already handled handout-derived theory figures for the early theory-facing sections.1394. Run `stage_picture_results.py` on the matched experiment picture-result directory.1405. If `course-lab-final-staging` emitted normalized `comparison_cases`, pass that summary JSON to `stage_picture_results.py` so same-case simulation images are copied into `picture-results/comparison-cases/`.1416. Convert `picture_results_manifest.json` into `picture_evidence_plan.json` and `picture_evidence_plan.md` with `plan_picture_evidence.py`.1427. If signed record sheets exist, run `stage_signatory_pages.py` and keep the emitted LaTeX snippet separate from the scientific results figures.1438. Use the staged draft as the placement surface and apply late picture placement near the already assembled figure-relevant content without rewriting non-figure prose.1449. Review grouping warnings, unmapped evidence units, and representative-subset choices before finalizing late picture placement.14510. Prefer same-case paired comparison units when both observed and simulation assets are available, placing experiment and simulation pictures together rather than in disconnected figure groups.14611. If the staged raster-image pool looks heavy against the `15 MB` coordination target, invoke `$compress-png` before handing off to `course-lab-finalize-qc`.14712. Keep compression in the same image format unless that still cannot get the asset pool under control.14813. If cross-format conversion looks necessary after same-format compression attempts, ask the user for confirmation first and wait before converting anything.149150## Quick Reference151152| Situation | Action |153|---|---|154| `course-lab-final-staging` already produced the staged draft | Use that staged draft as the upstream placement surface for late picture placement |155| Handout-derived theory images were already placed by `course-lab-experiment-principle` | Leave them alone and focus on late experiment evidence |156| Matched experiment photo folder is known | Run `stage_picture_results.py` |157| Serial-numbered files show a process sequence | Preserve the ordered sequence group in the manifest and evidence plan |158| Result-picture groups must map into report subsections late in the run | Run `plan_picture_evidence.py` to improve placement quality after final staging |159| Signatory sheets exist | Run `stage_signatory_pages.py` |160| PNG assets are inflating the image pool | Invoke `$compress-png`, keep PNG output if possible, and treat `15 MB` as a coordination target for late-stage handoff |161| Same-format compression still looks insufficient | Ask the user for confirmation first before converting to another format |162163## Boundary Rules164165- This skill starts only after source discovery and `course-lab-final-staging` are settled.166- This skill owns staging, grouping, evidence-plan artifacts, and late picture placement.167- This skill does not own handout-derived theory images already placed by `course-lab-experiment-principle`.168- This skill does not own non-figure prose writing.169- This skill does not own final compile or QC decisions.170- This skill does not own interpretation prose or discussion synthesis.171- Keep parent-skill path dependencies out of the workflow. Use the copied local scripts in this folder instead of the old parent report-skill folder.172- Preserve low-confidence mapping as warnings and placeholders instead of silently forcing a subsection or caption.173- Do not let captions or placement notes sound like workflow logs. Prefer neutral lab-report naming based on the file name stem or the handout description.174- Do not fold signatory pages into the scientific results discussion.175- Prefer same-format compression first. Do not switch staged images to another format unless necessary, and ask the user for confirmation first before any such conversion.176177## Common Mistakes178179- Reaching back into the old parent report-skill folder instead of using the copied local scripts.180- Treating the evidence plan as final interpretation prose or as a substitute for final QC instead of a late-stage placement contract.181- Reclaiming handout-derived theory images that were already owned by `course-lab-experiment-principle`.182- Guessing through ambiguous figure grouping instead of surfacing a visible question.183- Treating image-size guidance as if this skill owns the final compile-and-QC decision.184- Letting signatory-page captions drift into the footer by widening portrait scans without a height cap.185- Writing captions with provenance wording such as `source archive`, `staged evidence set`, `source label`, `metadata`, or `evidence pool`.186- Converting PNG assets to JPEG immediately instead of trying same-format compression first and getting user confirmation before any format switch.187188## Resources189190- `scripts/common.py`: local helper module copied for standalone use191- `scripts/stage_picture_results.py`: local picture-result staging tool192- `scripts/plan_picture_evidence.py`: local evidence-plan builder193- `scripts/stage_signatory_pages.py`: local signatory-page staging tool194- `tests/test_skill_package.py`: local standalone packaging checks195- `tests/test_stage_picture_results.py`: local regression tests for picture-result staging196- `tests/test_plan_picture_evidence.py`: local regression tests for evidence planning197- `tests/test_stage_signatory_pages.py`: local regression tests for signatory-page staging