Files
scarf/templates
Alan Wizemann 4efd84c119 feat(projects,cron): new project wizard + keychain env mirror + #75 fix
Three coordinated additions to the project surface:

1. New Project from Scratch wizard. Toolbar entry that scaffolds a
   Scarf-standard project skeleton (`<project>/.scarf/dashboard.json`
   placeholder + `AGENTS.md` marker block), registers it, opens an ACP
   chat session in the project's cwd, and auto-sends a kickoff prompt
   that activates the bundled `scarf-template-author` skill. The skill
   drives the substantive setup conversationally — widgets, optional
   config schema, optional cron, AGENTS.md content.

2. Keychain secrets mirror into ~/.hermes/.env. Cron jobs can now
   reference Keychain-backed config values via env vars named
   `SCARF_<UPPER_SLUG>_<UPPER_FIELDKEY>`. Hermes reloads .env per cron
   tick (cron/scheduler.py:897-903), so credential rotation is free.
   Source of truth stays in the Keychain — config.json keeps
   `keychain://` URIs unchanged. Mirror runs at install, post-install
   Configuration save, uninstall, "Remove from List", and on app
   launch (reconcileAll). Mode 0600 on `.env` enforced by
   LocalTransport's existing `.env` heuristic.

3. Configuration form layout recursion fix (issue #75). Per-stage
   frame sizes on `ConfigEditorSheet` triggered
   `_NSDetectedLayoutRecursion` for projects with manifest.json.
   Stabilized the outer frame at the editing stage's intrinsic size so
   transitions only swap content, never resize the container.

New services:
- `ProjectScaffolder` (Mac) — bare-shell project + AGENTS.md marker
- `SkillBootstrapService` (Mac) — copies bundled skills into ~/.hermes/skills/
- `KeychainEnvMirror` (Mac) — splice/unmirror/reconcileAll over ~/.hermes/.env
- `SecretsEnvBlock` (ScarfCore) — pure marker-block helpers

Bundled skill `scarf-template-author` v1.1.0 ships in
`Resources/BuiltinSkills.bundle/`; SkillBootstrapService copies it
into `~/.hermes/skills/scarf-template-author/` on launch (idempotent +
version-gated). The skill grew a "Using secrets in cron prompts"
section documenting the env-var convention.

Migration: launch reconciler auto-populates .env on first v2.8 launch.
Users with cron prompts authored against the old (broken) pattern need
to update them to use $SCARF_… references — see release notes.

Tests:
- SecretsEnvBlockTests: 24/24 (`swift test --filter SecretsEnvBlock`)
- KeychainEnvMirrorTests: 11/11 (`xcodebuild ... -only-testing:scarfTests/KeychainEnvMirror`)

The idempotent-mirror test caught a real bug: applyBlock's replace
path consumed the trailing newline from blockRange but didn't restore
it, breaking the no-op-when-unchanged contract that the launch
reconciler relies on. Fixed.

v2.8 RELEASE_NOTES.md committed but no release cut yet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 11:44:23 +02:00
..

Scarf Templates

The community template catalog for Scarf — a macOS GUI for the Hermes AI agent. Each subdirectory here is one installable project template. Browse the live catalog with live dashboard previews at https://awizemann.github.io/scarf/templates/.

What's a template?

A .scarftemplate bundle ships:

  • A pre-configured project dashboard (widgets for stats, lists, text, charts).
  • A cross-agent AGENTS.md (agents.md standard) that tells Claude Code, Cursor, Codex, Aider, Jules, Copilot, Zed, etc. how to work with the project.
  • Optional skills, cron jobs, optional per-agent instruction shims (CLAUDE.md, GEMINI.md, .cursorrules, .github/copilot-instructions.md), and an optional memory appendix.

Users install with one click from the catalog site or by opening a .scarftemplate file in Scarf.

Layout

Each template lives at templates/<github-handle>/<template-name>/ with:

templates/<github-handle>/<template-name>/
├── staging/                               source tree
│   ├── template.json                      manifest (id, name, version, contents claim)
│   ├── README.md                          shown on catalog detail page
│   ├── AGENTS.md                          required cross-agent instructions
│   ├── dashboard.json                     rendered as a live preview on the catalog site
│   ├── instructions/…                     optional per-agent shims
│   ├── skills/…                           optional namespaced skills
│   ├── cron/jobs.json                     optional cron job definitions
│   └── memory/append.md                   optional memory appendix
├── <template-name>.scarftemplate          built bundle (zipped staging/), committed as-is
└── screenshots/                           optional PNGs for the detail page

The built .scarftemplate is served directly from raw.githubusercontent.com — the catalog's Install button links at:

scarf://install?url=https://raw.githubusercontent.com/awizemann/scarf/main/templates/<author>/<name>/<name>.scarftemplate

Contributing a template

See CONTRIBUTING.md for the full submission walkthrough. tl;dr: fork, drop a template under templates/<your-handle>/<your-name>/, open a PR. A CI check validates the bundle; a maintainer reviews the content.

Catalog metadata

catalog.json at this directory is the aggregate index that the website reads. It's regenerated by the maintainer on merge — do not modify it in your PR, the build script will take care of it.

Current templates

Template Author Description
site-status-checker awizemann Daily HTTP uptime check for a user-editable list of URLs. Dashboard + cron + AGENTS.md.