一键导入
gpd-export
Export research results to HTML, LaTeX, or ZIP package
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Export research results to HTML, LaTeX, or ZIP package
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add research phase to end of current milestone in roadmap
Capture idea or task as todo from current research conversation context
Prepare a paper for arXiv submission with validation and packaging
Audit research milestone completion against original research goals
Create a hypothesis branch for parallel investigation of an alternative approach
List pending research todos and select one to work on
| name | gpd-export |
| description | Export research results to HTML, LaTeX, or ZIP package |
| argument-hint | [--format html|latex|zip|all] |
| context_mode | project-required |
| allowed-tools | ["read_file","write_file","shell","grep","glob"] |
<codex_runtime_notes> Codex shell compatibility:
gpd on PATH.GPD_ACTIVE_RUNTIME=codex uv run gpd ....
</codex_runtime_notes>Formats:
html: Standalone HTML with MathJax equations, structured results, and figureslatex: LaTeX document with derivations as appendices, ready for journal submission scaffoldzip: Package of scripts, data files, derivations, and a README for reproducibilityall: Generate all formatsUse this when sharing results with collaborators, preparing for publication, or archiving a milestone.
<execution_context>
Export research results into shareable formats. Collects key results, equations, derivations, and figures from all completed phases and packages them for external consumption. Supports HTML (with MathJax), LaTeX (journal-ready scaffold), ZIP (reproducibility package), or all formats.<required_reading> Read all files referenced by the invoking prompt's execution_context before starting. </required_reading>
**Load project context:**read_file:
.gpd/PROJECT.md -- project title, description, conventions.gpd/ROADMAP.md -- phase structure and status.gpd/STATE.md -- current positionROADMAP=$(/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local roadmap analyze)
if [ $? -ne 0 ]; then
echo "ERROR: gpd roadmap analyze failed: $ROADMAP"
# STOP — display the error to the user and do not proceed.
fi
Extract: project_title, milestone, completed phases list, total phase count.
If no completed phases:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
No completed phases found. Nothing to export.
Complete at least one phase before exporting:
$gpd-execute-phase <phase-number>
Exit.
**Scan all completed phase directories for exportable content:**For each completed phase:
/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local summary-extract {path} --field one_liner --field key_results --field equations --field key_files
Collect:
*.py, *.jl, *.m, *.nb files*.csv, *.json, *.dat, *.h5*.png, *.pdf, *.svg in phase directoriesaffects fieldsAlso collect VERIFICATION.md results for validation summary.
Store collected items grouped by phase.
**Parse format from arguments:**Parse --format from $ARGUMENTS.
| Argument | Format |
|---|---|
--format html or html | HTML only |
--format latex or latex | LaTeX only |
--format zip or zip | ZIP only |
--format all or all | All formats |
| (none) | Ask user |
If no format specified, ask:
╔══════════════════════════════════════════════════════════════╗
║ CHECKPOINT: Decision Required ║
╚══════════════════════════════════════════════════════════════╝
Export format:
1. **html** -- Standalone HTML with MathJax equations and structured results
2. **latex** -- LaTeX document scaffold ready for journal submission
3. **zip** -- Reproducibility package (scripts, data, derivations, README)
4. **all** -- Generate all formats
──────────────────────────────────────────────────────────────
→ Select: 1 / 2 / 3 / 4
──────────────────────────────────────────────────────────────
**Create export directory:**
mkdir -p exports
**If format is `html` or `all`:**
Write exports/results.html:
Structure:
<!doctype html>
<html>
<head>
<title>{project_title} -- Research Results</title>
<style>
body {
font-family: "Computer Modern", Georgia, serif;
max-width: 900px;
margin: 0 auto;
padding: 2em;
}
h1 {
border-bottom: 2px solid #333;
}
h2 {
color: #444;
margin-top: 2em;
}
table {
border-collapse: collapse;
width: 100%;
margin: 1em 0;
}
th,
td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f5f5f5;
}
.equation {
margin: 1em 2em;
padding: 0.5em;
background: #fafafa;
border-left: 3px solid #ccc;
}
.phase {
margin: 2em 0;
padding: 1em;
border: 1px solid #eee;
border-radius: 4px;
}
.verification {
padding: 0.5em 1em;
border-radius: 4px;
}
.passed {
background: #e8f5e9;
}
.warning {
background: #fff3e0;
}
.failed {
background: #ffebee;
}
</style>
</head>
<body>
<h1>{project_title}</h1>
<p><em>Generated with Get Physics Done (PSI) | {YYYY-MM-DD} | Milestone: {milestone_name}</em></p>
<h2>Summary</h2>
<p>{project description from PROJECT.md}</p>
<h2>Results by Phase</h2>
{For each completed phase:}
<div class="phase">
<h3>Phase {N}: {Name}</h3>
<p>{one_liner from SUMMARY.md}</p>
<h4>Key Results</h4>
<ul>
{key results as list items}
</ul>
<h4>Equations</h4>
{equations wrapped in \(...\) or \[...\] for MathJax}
</div>
<h2>Conventions</h2>
{Convention table from PROJECT.md and affects fields}
<h2>Verification Summary</h2>
{Aggregate verification results}
</body>
</html>
**If format is `latex` or `all`:**
Write exports/results.tex:
Structure:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{physics}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{graphicx}
\title{{project_title}}
\author{[Author Name]}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
{Project description from PROJECT.md -- placeholder for user to refine}
\end{abstract}
\section{Introduction}
% Generated scaffold -- fill in motivation and context
\section{Methods}
% Generated from phase descriptions and approaches
{For each completed phase:}
\subsection{Phase {N}: {Name}}
{One-liner description}
\subsubsection{Key Results}
\begin{itemize}
{key results as \item entries}
\end{itemize}
{Equations as \begin{equation} blocks}
\section{Results}
% Aggregate key findings across all phases
\section{Discussion}
% Placeholder for interpretation
\section{Conclusion}
% Placeholder for summary
\appendix
{For each phase with detailed derivations:}
\section{Phase {N}: {Name} -- Derivation Details}
{Detailed derivation content from SUMMARY.md}
\begin{center}
{\footnotesize\textit{Generated with Get Physics Done (PSI)}}
\end{center}
\end{document}
Also write exports/results.bib if any citations found in SUMMARY files.
Collect all exportable files:
*.py, *.jl, *.m, *.nb) from completed phase directories*.csv, *.json, *.dat, *.h5) from completed phase directoriesWrite exports/README.md:
# {project_title} -- Reproducibility Package
## Contents
- `scripts/` -- Computation scripts by phase
- `data/` -- Output data files by phase
- `summaries/` -- Research summary for each plan
- `PROJECT.md` -- Project description and conventions
- `ROADMAP.md` -- Research phase structure
## Phase Index
{Table: phase number, name, status, scripts included, data included}
## Reproduction Instructions
{For each phase with scripts: how to run them, dependencies, expected outputs}
## Generated
Date: {YYYY-MM-DD}
Attribution: Generated with Get Physics Done (PSI)
Copy collected files into the exports directory structure:
mkdir -p exports/scripts exports/data exports/summaries
# Copy scripts, data, SUMMARYs from phase directories into exports/
cp .gpd/PROJECT.md exports/PROJECT.md 2>/dev/null
cp .gpd/ROADMAP.md exports/ROADMAP.md 2>/dev/null
# Copy phase scripts/data/summaries into their respective subdirectories
Create the ZIP:
cd exports && zip -r results.zip README.md scripts/ data/ summaries/ PROJECT.md ROADMAP.md 2>/dev/null
If no zip utility available, create a tar.gz instead:
cd exports && tar -czf results.tar.gz README.md scripts/ data/ summaries/ PROJECT.md ROADMAP.md 2>/dev/null
**Present export summary:**
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GPD > EXPORT COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Project:** {project_title}
**Phases exported:** {N} completed phases
**Formats:** {list of formats generated}
| File | Size | Format |
|------|------|--------|
| exports/results.html | {size} | HTML + MathJax |
| exports/results.tex | {size} | LaTeX |
| exports/results.bib | {size} | BibTeX |
| exports/results.zip | {size} | ZIP package |
### Notes
- **HTML:** Open in any browser. Equations render via MathJax (requires internet).
- **LaTeX:** Compile with `pdflatex results.tex`. Fill in [Author Name] and placeholder sections.
- **ZIP:** Self-contained reproducibility package with README.
───────────────────────────────────────────────────────────────
**Also available:**
- `$gpd-write-paper` -- draft a full paper from research results
- `$gpd-progress` -- check research progress
───────────────────────────────────────────────────────────────
**Commit text-based exports (not binary archives):**
Commit the HTML and LaTeX exports. Do NOT commit ZIP/tar.gz archives (binary artifacts that bloat git).
# Only commit text-format exports that were actually generated
COMMIT_FILES=()
for path in exports/results.html exports/results.tex exports/results.bib; do
if [ -f "$path" ]; then
COMMIT_FILES+=("$path")
fi
done
if [ ${#COMMIT_FILES[@]} -gt 0 ]; then
PRE_CHECK=$(/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local pre-commit-check --files "${COMMIT_FILES[@]}" 2>&1) || true
echo "$PRE_CHECK"
/Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local commit \
"docs: export research results" \
--files "${COMMIT_FILES[@]}"
else
echo "No text exports generated; nothing to commit."
fi
The commit CLI respects commit_docs from config internally — if disabled, the commit is automatically skipped.
<anti_patterns>
<success_criteria> Export is complete when:
</success_criteria>
</execution_context>
Format: $ARGUMENTS (optional -- if not provided, ask user)@.gpd/PROJECT.md @.gpd/ROADMAP.md @.gpd/STATE.md
Execute the export workflow from @./.codex/get-physics-done/workflows/export.md end-to-end.Read PROJECT.md, ROADMAP.md, and all SUMMARY.md files from completed phases.
Parse --format from $ARGUMENTS. If not specified, ask user.
Route to appropriate generator (html, latex, zip, or all).
Write files to exports/.
Display file locations, sizes, and instructions for each format.
<success_criteria>