算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
agent-collaboration-protocol【设计与创意】Structured multi-agent collaboration for backend + frontend builds. Use when an orchestrator needs to coordinate a backend engineer and frontend engineer on the same feature. Triggered by multi-role build requests like "build a dashboard with an API and UI" or "create a full-stack feature" or any task requiring both backend (API, data, infra) and fro…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Three roles collaborate through a shared workspace:
| Role | Responsibility |
|---|---|
| Orchestrator | Defines the contract, spawns both builders, verifies integration, merges |
| Backend Engineer | Writes API code, data models, infrastructure |
| Frontend Engineer | Writes UI components, templates, styles |
The contract lives in shared/build-{YYYYMMDD}/. Both builders write to the same directory. The orchestrator inspects and merges when both are done.
shared/build-{YYYYMMDD}/
SPEC.md ← Integration contract
backend/ ← Backend Engineer writes here
frontend/ ← Frontend Engineer writes here
integration.md ← Both update as they work
Write SPEC.md with these sections:
# SPEC: {Feature Name}
## Contract
- API base path, auth scheme, content type
- Data models (all entities, fields, types, relationships)
- Endpoints (method, path, request/response shapes)
- Error format
## Routes
Backend Engineer implements these. Frontend Engineer consumes them.
## UI Components
Frontend Engineer builds these. Backend Engineer doesn't touch them.
## Success Criteria
Observable behavior. Not "tests pass" — "user can log in and see calendar."
Spawn two subagents with sessions_spawn:
Backend Engineer:
task: >
Implement the API spec in shared/build-{YYYYMMDD}/SPEC.md.
Write all backend code to shared/build-{YYYYMMDD}/backend/.
Update shared/build-{YYYYMMDD}/integration.md with progress.
Use {backend framework} (FastAPI, Express, etc.).
Frontend Engineer:
task: >
Implement the UI for the spec in shared/build-{YYYYMMDD}/SPEC.md.
Write all frontend code to shared/build-{YYYYMMDD}/frontend/.
Use the API contract in SPEC.md for your fetch calls.
Update shared/build-{YYYYMMDD}/integration.md with progress.
Use {frontend stack} (HTMX+Tailwind, React, etc.).
Set mode: "run" for one-shot completion.
Backend Engineer writes to shared/build-{YYYYMMDD}/backend/:
integration.md with progress and any blockersFrontend Engineer writes to shared/build-{YYYYMMDD}/frontend/:
integration.md with progress and any blockersintegration.md from both agentsbackend/ and frontend/Run once per project to initialize the collaboration structure:
scripts/init_collab.sh /path/to/project
Creates shared/ with template SPEC.md and .gitignore.
For deeper patterns and templates:
references/spec-template.md — Full SPEC.md template with examplesreferences/integration-log.md — integration.md status formatreferences/handoff-format.md — Task handoff message templatesessions_spawn tool (OpenClaw v1.0+)