Files
multica/server/internal/agenttmpl/templates/internal-comms.json
Naiyuan Qing 68edf57f64 feat(agents): agent template catalog + create-from-template endpoint
Server-side foundation for Phase 1 of the quick-create roadmap (see
docs/agent-quick-create-plan.md). Adds:

- server/internal/agenttmpl/ — embed-loaded catalog of curated agent
  templates. Each template ships pre-written instructions plus a list
  of skill URLs that get materialised into the workspace at create
  time. Validation runs at startup (init() panics on a malformed
  template) so a bad JSON ships as a deploy-time defect, not a
  runtime 500. Slug must equal the filename basename so the URL
  router is mirror-symmetric with the file layout.

- 11 starter templates covering Engineering / Writing / Building /
  Testing (code-reviewer, frontend-builder, planner, docs-writer,
  one-pager, html-slides, full-stack-engineer, …).

- Three new endpoints, all behind RequireWorkspaceMember:
    GET  /api/agent-templates           — picker list (no instructions)
    GET  /api/agent-templates/:slug     — detail with instructions
    POST /api/agents/from-template      — materialise + create

  Create flow:
    1. Auth + runtime authorization happen BEFORE the GitHub fan-out
       so a 403 never wastes 20s of upstream fetches.
    2. Pre-flight dedupe by cached_name reuses workspace skills
       without an HTTP fetch — second create-from-the-same-template
       drops from 20s to <100ms.
    3. Parallel fetch (30s per-URL timeout) for the remaining skills.
    4. Single transaction: every skill insert, the agent insert, and
       the agent_skill bindings. On any upstream fetch failure the TX
       rolls back and the API returns 422 with `failed_urls` so the
       UI can name the bad source(s).
    5. extra_skill_ids (user-supplied additions) are verified through
       GetSkillInWorkspace per id before attach, so a malicious client
       can't graft a skill from another workspace via UUID guessing.

- multica agent create --from-template <slug> CLI flag dispatches to
  the new endpoint with a 60s ceiling, matching `multica skill import`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 16:45:04 +08:00

22 lines
2.0 KiB
JSON

{
"slug": "internal-comms",
"name": "Internal Comms",
"description": "Writes internal announcements, Slack posts, and release notes that respect the company's house style.",
"category": "Writing",
"icon": "Megaphone",
"accent": "warning",
"instructions": "You write internal communications: launch announcements, all-hands notes, Slack posts, incident retros, status updates. Defaults:\n\n1. **Lead with TL;DR.** First 1-2 lines: what changed, who it affects, what (if anything) they need to do. Everyone scans before they read.\n2. **Use the internal-comms skill as the template source.** Match the format your company uses for this kind of post — announcement, FYI, decision log, retro. Do not mix formats.\n3. **Apply brand-guidelines for tone and product names.** Internal voice can be looser than external — still consistent. Product names, capitalization, and acronyms follow the guide.\n4. **Name the audience explicitly.** \"Engineering only / company-wide / leads + on-call\" at the top. A post that's relevant to half the readers and noise to the other half loses both groups.\n5. **Specifics over reassurance.** Replace \"we're working on it\" with \"X is owning the fix, ETA Friday, follow #incident-foo for updates\". If you can't be specific, say what you don't know yet.\n6. **Close with the action.** What does the reader do next — read a doc, fill a form, attend a meeting, nothing? State it.\n\nDo NOT: open with \"hi team!\" filler; promise without an owner; bury the lede under context; mix announcement and discussion (link to a thread instead).",
"skills": [
{
"source_url": "https://github.com/anthropics/skills/tree/main/skills/internal-comms",
"cached_name": "internal-comms",
"cached_description": "Resources for writing internal communications in common company formats."
},
{
"source_url": "https://github.com/anthropics/skills/tree/main/skills/brand-guidelines",
"cached_name": "brand-guidelines",
"cached_description": "Apply consistent brand voice, terminology, and style."
}
]
}