Commentary Form Creation
Use this skill to create valid Commentary Form Contract v1 source artifacts and operate them through Commentary. For question, flow, visual, or personalization decisions, use design-effective-forms first.
First Checks
- Inspect the current folder before choosing a creation path.
- If it is a git repo containing
forms/*.form.yaml,forms/*.form.yml,forms/*.form.json, orforms/results/**/**/*.result.json, treat local files as the source-backed workflow. - If no local source-backed form repo is found, default to Commentary MCP with
draft_reviewfor authoring andcommentary_formsfor validation and form operations. - If a local
.commentary/session.jsonexists for a draft review, prefer the draft review workflow and preserve that session.
Do not call commentary_forms with create or update for normal authoring. Standalone Forms API creation/editing is removed. Create or edit form source files through git-backed artifacts or draft review files.
Read references/contract-v1.md for contract fields and examples. Read references/adaptive-forms.md when a form creates respondent-specific follow-up sections.
Local Source-Backed Workflow
Use local files when the repo is the intended source of truth.
- Create standalone forms under
forms/<stable-name>.form.yamlunless the user asks for JSON. - Use stable ASCII ids such as
security.revieworrelease-readiness. - Keep
schema.additionalProperties: falsefor ordinary object forms. - Include
submit.destinationswith{ kind: commentary, enabled: true }. - Validate the source through MCP when available:
{
"action": "validate_contract",
"contractSource": "commentaryForm: 1\nid: release-readiness\ntitle: Release readiness\nschema:\n type: object\n",
"sourceFormat": "yaml"
}
If MCP is unavailable, validate by careful inspection against references/contract-v1.md and tell the user validation still needs to run in Commentary.
MCP Draft-Backed Workflow
Use this path when no local form repo exists or the user wants a form draft before committing source.
- Author a complete YAML contract in memory.
- Validate it with
commentary_formsvalidate_contract. - Create a draft review file with
draft_review:
{
"action": "create",
"title": "Intake form",
"sourceType": "mcp",
"files": [
{
"path": "forms/intake.form.yaml",
"content": "commentaryForm: 1\nid: intake.quick\ntitle: Intake\nschema:\n type: object\n",
"contentType": "auto"
}
]
}
- Share the draft review URL if the MCP response includes one.
- If the user wants review comments on structure, use
commentary-draft-reviewagainst the draft review rather than creating a second review surface.
Response Links
Create response links only from an accessible source-backed form.
Use commentary_forms create_fillout_link with:
formIdorreferenceIdsourceContextwhen the token is review-scoped or the form is embeddedshareMode:specific_user,authenticated, oranonymousreplyMode:identifiedoranonymousrepeatSubmissionsbased on the business rule
Do not use anonymous links for sensitive data unless the user explicitly accepts anonymous replies and result ownership constraints.
Adaptive Respondent Instances
Adaptive Forms do not mutate the shared source contract. The contract opts in with adaptive.enabled: true and adaptive.handoff: mcp_pull_queue. At a configured boundary, use commentary_forms to list and claim the pending transition, then complete it with show_section, complete, or fallback.
Generated sections belong to that submission instance. Use only the bounded answer snapshot and sanitized context returned for the transition. Preserve the audit trail and deterministic fallback. Read references/adaptive-forms.md for the action sequence and invariants.
Guardrails
- Treat server validation as authoritative.
- Do not store tokens, private review URLs, reviewer identities, customer submissions, or local machine paths in repo files.
- Do not invent source permissions in
sourceContext; Commentary derives trusted result access server-side. - Keep forms source-authored: git files, Markdown/HTML embeds, draft review files, response links, or custom renderer submissions.
- Keep generated YAML deterministic and stable so diffs are reviewable.
- Pass a stable
agentAliason state-changing MCP actions. forms.adaptive_agentis Pro; do not represent it as part of basic Forms.