diff --git a/skills/daybook-posting/SKILL.md b/skills/daybook-posting/SKILL.md index 579944a..c48952f 100644 --- a/skills/daybook-posting/SKILL.md +++ b/skills/daybook-posting/SKILL.md @@ -41,15 +41,25 @@ DAYBOOK_SOURCE=agent | Kind | Use for | Content shape | |---|---|---| -| `markdown` | Reports, briefs, notes | Markdown text. Fenced code blocks get syntax highlighting. | -| `html_fragment` | Themed HTML reports/cards/tables | Body-only HTML. No `html/head/body`. | -| `html_full` | Complete custom pages/frameworks | Full HTML document with doctype/html/head/body. See "CDN Snippets" below. | +| `markdown` | Reports, briefs, notes | Markdown text. Fenced code blocks get syntax highlighting; tables (pipe syntax) render styled automatically. | +| `html_fragment` | Themed HTML reports/cards/tables | Body-only HTML. No `html/head/body`. Tables render styled automatically, same as markdown. | +| `html_full` | Complete custom pages/frameworks | Full HTML document containing `` (`` recommended, not required). See "CDN Snippets" below. | | `deck` | Simple slide-like artifact | Top-level `
...
` blocks. | | `json` | Structured data, metrics, run summaries | Valid JSON text. Renders as a collapsible tree. | -| `csv` | Tabular data | CSV text, first row as header. Renders as a sortable/searchable table. | +| `csv` | Tabular data | CSV text, first row as header. Renders as a sortable/searchable table. `.xlsx` files convert to this automatically — see below. | For images, PDFs, SVGs, and other files, use `--file`; the helper infers multipart and content type. +`--theme` (for `markdown`/`html_fragment` only) accepts `report` (default — +serif, warm background), `tasks`, or `base` (minimal, no color styling). +`deck`/`html_full`/`json`/`csv` ignore `--theme` — each has its own fixed +presentation. + +This script only **creates** artifacts — none of the following are +possible through it. Updating an existing artifact's title/tags/metadata, +or deleting one, requires the raw API (see `docs/api.md`); enabling its +public share link is feed-UI-only, with no API equivalent at all yet. + ## CDN Snippets For `html_full` `html_full` is Daybook's escape hatch for custom pages — nothing is @@ -111,6 +121,8 @@ python skills/daybook-posting/scripts/daybook_post.py report.md The image is linked to the artifact that references it and is deleted along with it. Unreferenced uploads are cleaned up after 24 hours. +## CSV, JSON, And Spreadsheets + For CSV and JSON, use `--kind csv`/`--kind json` with `--content-file` — or just post the file positionally; auto-mode detects `.csv`/`.json` and picks the right kind automatically: @@ -127,15 +139,44 @@ python skills/daybook-posting/scripts/daybook_post.py --kind json --title "Run S python skills/daybook-posting/scripts/daybook_post.py balance_sheet.xlsx ``` -The server converts it to a `csv` artifact automatically (active sheet -only; see `docs/api.md` for the full list of conversion limitations — -notably, formulas need to have been calculated by real spreadsheet software -that saved the file, and rich formatting like bold/colors/merged cells -isn't preserved). +The server converts it to a `csv` artifact automatically. Known +limitations (see `docs/api.md` for the full list): -For other code that should render today, use `--file path --as-markdown` to -post it as a Markdown fenced code block. Without `--as-markdown`, it uploads -as a downloadable binary file. +- Only the workbook's **active sheet** converts; other sheets are dropped. +- Formula cells need to have been calculated and saved by real spreadsheet + software (Excel, LibreOffice, etc.) — a workbook a script wrote but never + opened in a real spreadsheet app will show those cells blank. +- Rich formatting (bold, colors, merged cells) isn't preserved — it's a + plain sortable/searchable table either way. +- Legacy `.xls` isn't supported, only `.xlsx`. + +## Other Code + +For code that isn't CSV/JSON but should render today rather than download +as a binary, use `--file path --as-markdown` to wrap it in a Markdown +fenced code block (still gets syntax highlighting): + +```bash +python skills/daybook-posting/scripts/daybook_post.py --file script.py --as-markdown --title "Generated Script" +``` + +Without `--as-markdown`, it uploads as a downloadable binary file instead. + +## Source & Provenance Fields + +All optional, all default to something reasonable if omitted: + +| Flag | Default | Notes | +|---|---|---| +| `--source-type` | `agent` | One of `agent`, `person`, `system`. | +| `--source-name` | Same as the effective source (`--source`, or `DAYBOOK_SOURCE` if `--source` wasn't given) | Human-readable name, e.g. "Hermes Agent". | +| `--source-id` | Empty string | A stable external ID, if the poster has one. | +| `--source-prompt` | Empty string | The prompt/instruction that produced this artifact — useful for later tracing why something was posted. | + +Use `--meta key=value` (repeatable) or `--meta-json '{"key": "value"}'` +(merged together if both are given) for structured, machine-readable +context like `run_id` or `model` — these end up in the artifact's +`metadata` field, distinct from tags. ## Rules @@ -144,3 +185,4 @@ as a downloadable binary file. - Use `--tags a,b,c` for filtering. - Use `--meta run_id=... --meta model=...` for machine-readable context. - Never inline multiline content into the shell command; use a file or stdin. +- Add `--dry-run` to see exactly what would be sent (method, headers, payload) without actually posting — useful when unsure a payload is well-formed.