Skip to content

docs(skills): per-kind artifact schemas for selfhosted skill; diff callout#28

Merged
baanish merged 2 commits intomainfrom
cursor/selfhosted-skill-artifact-schemas-c6ee
Apr 14, 2026
Merged

docs(skills): per-kind artifact schemas for selfhosted skill; diff callout#28
baanish merged 2 commits intomainfrom
cursor/selfhosted-skill-artifact-schemas-c6ee

Conversation

@baanish
Copy link
Copy Markdown
Owner

@baanish baanish commented Apr 8, 2026

Summary

  • Added skills/selfhosted-agent-render/SKILL.md: the repo did not contain this skill yet; the new doc mirrors the linking skill’s per-kind coverage with a self-hosted <origin> framing, full envelope example, and minimal JSON examples for each artifact kind.
  • Diff is documented with both patch and oldContent/newContent forms, optional language and view, and an explicit blockquote callout that content is invalid for diffs and fails validation.
  • Updated skills/agent-render-linking/SKILL.md: added the requested Note after the diff patch example about required fields vs content.

Merge with main

Merged latest origin/main (UUID SQLite self-hosted server). Resolved add/add conflict on skills/selfhosted-agent-render/SKILL.md by keeping the server/API/TTL content from main and inserting the full per-kind artifact reference from this branch.

Acceptance

  • Selfhosted skill includes all five kinds with minimal artifact-only JSON examples.
  • Diff uses patch / oldContent+newContent, not content.
  • Callout in both skills about the diff/content mistake.
  • No product or protocol behavior changes—documentation only.
Open in Web Open in Cursor 

Open with Devin

Summary by CodeRabbit

  • Documentation
    • Clarified artifact format requirements and validation rules for different artifact types
    • Added explicit guidance on diff artifact constraints and common validation mistakes
    • Enhanced documentation with detailed per-artifact-kind schema specifications for improved clarity

…llout in linking skill

- Add selfhosted-agent-render skill with envelope example and all five artifact kinds
- Document diff patch vs oldContent/newContent and warn against using content
- Add matching diff field note to agent-render-linking after patch example

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 8, 2026

Deploying agent-render with  Cloudflare Pages  Cloudflare Pages

Latest commit: 29bbce6
Status: ✅  Deploy successful!
Preview URL: https://17dfa37c.agent-render.pages.dev
Branch Preview URL: https://cursor-selfhosted-skill-arti.agent-render.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18867548-d27c-4714-a342-cd831302e46e

📥 Commits

Reviewing files that changed from the base of the PR and between eb2cafb and 29bbce6.

📒 Files selected for processing (2)
  • skills/agent-render-linking/SKILL.md
  • skills/selfhosted-agent-render/SKILL.md

📝 Walkthrough

Walkthrough

Documentation updates to two SKILL.md files clarifying artifact shape requirements for diff artifacts and other artifact kinds. The changes explicitly state that diff artifacts disallow the content field and require either patch or both oldContent and newContent fields.

Changes

Cohort / File(s) Summary
Artifact Documentation Clarification
skills/agent-render-linking/SKILL.md
Added clarification that diff artifacts only support patch or oldContent/newContent representations, not content.
Artifact Schema Specification
skills/selfhosted-agent-render/SKILL.md
Expanded documentation with detailed per-kind artifact schemas and constraints. Clarified that Markdown, Code, CSV, and JSON require content field, while Diff explicitly disallows content and requires patch or (oldContent + newContent) pair. Added note about common validation mistake with diff artifacts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Diff artifacts now clear and bright,
No content field, but patches right!
Schemas sketched for every kind,
Documentation well-designed! 📋✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: documentation updates for per-kind artifact schemas in the selfhosted skill and a clarification callout about diff artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/selfhosted-skill-artifact-schemas-c6ee

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Resolve add/add conflict in skills/selfhosted-agent-render/SKILL.md by
keeping the UUID server workflow from main and inserting per-kind envelope
examples plus the diff/content validation callout.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@baanish baanish marked this pull request as ready for review April 8, 2026 22:27
@baanish baanish requested a review from Copilot April 8, 2026 22:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29bbce67ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

---
name: selfhosted-agent-render
description: Create and manage agent-render artifacts via a self-hosted UUID-based server. Use when an agent needs to share rendered artifacts through short UUID links instead of fragment-encoded URLs. Ideal when payloads exceed the ~8 KB fragment budget, when links will be shared on platforms that mangle long URLs, or when the agent and viewer run on the same machine. Supports markdown, code, diffs, CSV, and JSON — same artifact kinds as the fragment-based product. The self-hosted server stores payloads in SQLite with a 24-hour sliding TTL.
description: Create and manage agent-render artifacts via a self-hosted UUID-based server. Use when an agent needs to share rendered artifacts through short UUID links instead of fragment-encoded URLs. Ideal when payloads exceed the ~8 KB fragment budget, when links will be shared on platforms that mangle long URLs, or when the agent and viewer run on the same machine. Supports markdown, code, diffs, CSV, and JSON — same artifact kinds and envelope validation as the fragment-based product. The self-hosted server stores payloads in SQLite with a 24-hour sliding TTL.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify self-hosted API skips envelope validation

This description now states that self-hosted mode has the same envelope validation as fragment mode, but POST /api/artifacts currently only validates that payload is a non-empty string under the size cap (selfhosted/server.ts + selfhosted/validate.ts) and does not decode or validate artifact/envelope shape. In practice, malformed envelopes are accepted at write time and only fail later when viewed, so this wording can mislead agents into relying on create-time validation and make debugging failed renders harder.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds/aligns documentation for the self-hosted agent-render skill so agents can produce valid per-artifact envelopes (especially diffs), and updates the fragment-linking skill with a diff field note.

Changes:

  • Added per-kind artifact schema/examples (markdown/code/diff/csv/json) to selfhosted-agent-render docs, including diff patch vs oldContent/newContent.
  • Added an explicit note in agent-render-linking docs that diff artifacts don’t use content.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
skills/selfhosted-agent-render/SKILL.md Adds per-kind artifact shapes/examples and diff guidance for self-hosted payloads.
skills/agent-render-linking/SKILL.md Adds a short note clarifying required diff fields vs content.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
```

Markdown supports **mermaid** diagrams via fenced code blocks: use ` ```mermaid ` fences inside `content`; the viewer renders them client-side with theme-aware styling.
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline code span ```mermaid contains backticks inside a single-backtick code span, which breaks Markdown rendering on GitHub. Reword this to avoid nesting backticks (e.g., refer to a fenced code block starting with "```mermaid" without wrapping the triple backticks in single-backtick inline code, or use a longer inline-code delimiter).

Suggested change
Markdown supports **mermaid** diagrams via fenced code blocks: use ` ```mermaid ` fences inside `content`; the viewer renders them client-side with theme-aware styling.
Markdown supports **mermaid** diagrams via fenced code blocks: use fenced code blocks starting with "```mermaid" inside `content`; the viewer renders them client-side with theme-aware styling.

Copilot uses AI. Check for mistakes.
}
```

> **Common mistake:** Diff artifacts do NOT use a `content` field. Use `patch` for unified diffs or provide both `oldContent` and `newContent`. A `content` field on a diff artifact will fail envelope validation.
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The callout says that including a content field on a diff artifact "will fail envelope validation", but the runtime validators only require a diff to have patch or oldContent+newContent and do not reject extra fields. This is potentially misleading for consumers; consider rephrasing to say content is ignored/unused for diffs (and that patch or oldContent/newContent are the required fields).

Suggested change
> **Common mistake:** Diff artifacts do NOT use a `content` field. Use `patch` for unified diffs or provide both `oldContent` and `newContent`. A `content` field on a diff artifact will fail envelope validation.
> **Common mistake:** Diff artifacts do NOT use a `content` field. Use `patch` for unified diffs or provide both `oldContent` and `newContent`. If `content` is included on a diff artifact, it is ignored/unused for diffs; `patch` or `oldContent` + `newContent` are the required fields.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@baanish baanish merged commit 30ca2b8 into main Apr 14, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants