| name | export |
| description | Export a rendered decision-analysis PDF — upload to Google Drive via the configured gws MCP server, copy to a chosen local path, or both. Run after /decision:render-pdf. |
Export
Pushes the analysis PDF (and optionally the markdown source) to a destination.
Inputs
A workspace folder containing analysis.pdf. Optional flags:
--drive — upload to Google Drive (uses configured gws MCP).
--copy=<path> — copy to a local path.
- (none) — interactive: ask which destination(s).
Resolve config
Read drive.mcp_server and drive.default_folder from $DATA_ROOT/config.json. If mcp_server is null, Drive upload is unavailable — say so and offer local-copy only.
Procedure
Drive upload
- Resolve the configured gws MCP server (e.g.
gws-personal). The upload_file tool on that server takes a local file path and a Drive folder.
- Resolve the destination folder. Default from config; let the user override.
- Upload
analysis.pdf (and synthesis.md if the user wants it as a separate Doc).
- Capture the Drive file ID and link. Report it to the user.
Local copy
- If
--copy=<path> given, copy the PDF there. If the path is a directory, name the file <slug>-decision-analysis.pdf. If a file path, use it.
- If the path doesn't exist, create the parent directory.
- Report the destination.
Both
Run Drive then local-copy. Report both destinations.
Notes
- Don't delete the workspace after export — keep it as the canonical record.
- If Drive upload fails (auth, quota, network), surface the error verbatim and offer local-copy as a fallback.
- Mention the file is linkable / shareable from Drive but the user must set sharing permissions if they want others to see it.