From d1c8df10827843ee05abdec85f6f66a03d65bdcb Mon Sep 17 00:00:00 2001 From: devnomad Date: Sun, 5 Jul 2026 00:41:36 +0800 Subject: [PATCH] Add Cosmosmith multi-agent workflow rule --- README.md | 1 + rules/cosmosmith-multi-agent-workflow.mdc | 66 +++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 rules/cosmosmith-multi-agent-workflow.mdc diff --git a/README.md b/README.md index 8204dac5..f8b2a304 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,7 @@ By adding selected `.mdc` files to `.cursor/rules/`, you can use these rules dir - [Code Guidelines](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/code-guidelines-cursorrules-prompt-file.mdc) - Code development with guidelines integration. - [Code Pair Interviews](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/code-pair-interviews.mdc) - Interview practice and collaborative coding sessions. - [Code Style Consistency](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/code-style-consistency-cursorrules-prompt-file.mdc) - Code development with style consistency integration. +- [Cosmosmith Multi-Agent Workflow](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/cosmosmith-multi-agent-workflow.mdc) - Multi-agent workflow governance with AGENTS.md, task.md, role handoffs, and verification evidence. - [Embedded MCU / STM32 / HAL](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/embedded-stm32-hal.mdc) - Embedded C/C++ development with STM32 HAL, interrupts, DMA, memory constraints, and hardware-focused testing. - [Engineering Ticket Template](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/engineering-ticket-template-cursorrules-prompt-file.mdc) - Engineering development with ticket template integration. - [GitHub Code Quality](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/github-code-quality-cursorrules-prompt-file.mdc) - GitHub development with code quality integration. diff --git a/rules/cosmosmith-multi-agent-workflow.mdc b/rules/cosmosmith-multi-agent-workflow.mdc new file mode 100644 index 00000000..23dc02f6 --- /dev/null +++ b/rules/cosmosmith-multi-agent-workflow.mdc @@ -0,0 +1,66 @@ +--- +description: Multi-agent workflow governance with AGENTS.md, task.md, role handoffs, and verification evidence. +globs: **/* +alwaysApply: false +--- + +# Cosmosmith Multi-Agent Workflow + +Use this rule when a project coordinates AI coding work across Cursor, Claude Code, Codex, Copilot, OpenCode, Trae, or similar tools. + +## Canonical Rules + +- Treat `AGENTS.md` as the canonical project constitution. +- Treat tool-specific files such as `CLAUDE.md`, `.cursor/rules/*.mdc`, `.github/copilot-instructions.md`, `.opencode/AGENTS.md`, and `.trae/rules/*.md` as adapters. +- If an adapter conflicts with `AGENTS.md`, follow `AGENTS.md` and update the adapter later. + +## Task Protocol + +- Use `task.md` as the active task ledger. +- Claim one small task at a time. +- Record the role, prompt, context, expected output, harness, loop, and evidence. +- Do not mark work done until verification evidence is recorded. + +## Role Mesh + +Use role context deliberately: + +- Product: clarify user, job, first slice, and acceptance criteria. +- Research: gather current competitor, ecosystem, standards, or regulatory evidence when needed. +- Architect: define boundaries, data flow, risks, and integrations. +- UI/UX: define flows, states, accessibility, and interaction behavior. +- Frontend: implement client-side slices and verify browser behavior. +- Backend: implement APIs, persistence, domain logic, permissions, and contracts. +- QA: turn acceptance criteria into reproducible evidence. +- DevOps: verify build, configuration, deployment, monitoring, and rollback. +- Governance: check rule drift, missing evidence, and incomplete task handoffs. + +## Prompt, Context, Harness, Loop + +For substantial work, make these explicit: + +- Prompt: current instruction and expected output. +- Context: selected files, specs, research, constraints, and prior decisions. +- Harness: tests, linters, build commands, browser checks, or review gates. +- Loop: feedback used before calling the task complete. + +## Large Task Ledgers + +For large `task.md`, `todo.md`, or checkpoint files: + +- Do not load the whole ledger into context unless needed. +- Select the next claimable task. +- Summarize only the relevant context. +- Implement the smallest verifiable slice. +- Run the harness. +- Update evidence and status. + +## Optional Initializer + +This rule is based on the Cosmosmith workflow initializer: + +```bash +npx cosmosmith@latest init --all +``` + +Repository: https://github.com/devnomad-byte/cosmosmith