بنقرة واحدة
write-design-doc
Produce a 1-page design doc, open a PR, and ping Discord for review.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Produce a 1-page design doc, open a PR, and ping Discord for review.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Lint, run the pre-PR checks, commit, push, and author or update the branch's pull request in the required plain-text format. Use when committing, pushing, or creating/updating a PR.
Modify or upstream a Grug/Grugformer experiment variant.
Run a perf gate on a PR that touches lib/zephyr internals.
Curate the experiment report index at docs/reports/index.md.
Triage a failed canary ferry run (CI-invoked).
Refresh Marin TPU-vLLM forks from a tpu-inference release/LKG pair, update exact SHA pins, run TPU smokes, and open the Marin PR.
| name | write-design-doc |
| description | Produce a 1-page design doc, open a PR, and ping Discord for review. |
A design doc in Marin is a ~1-page document posted as a PR for early feedback. It surfaces design issues before implementation, not to gate work — area owners LGTM or comment quickly, and the author implements in parallel. See issue #5210 for rationale.
This skill is interactive: ask the user questions when you genuinely don't know, but make reasonable inferences and proceed when you can.
The template lives at .agents/projects/design-template.md. New docs go to a slug-named directory .agents/projects/<slug>/ (slug only, no date prefix — git log records the date). Inside it:
design.md — the 1-pager (always).research.md — in-repo refs, prior art, Q&A summary (always — even a short one).spec.md — concrete contracts, written after the design stabilises (always).spec.md is the contract layer, not an implementation plan. It pins the public surface — .proto content, public class/function signatures with types, schema-registry CREATE tables, directory layout, file paths. It excludes algorithm pseudocode, sequenced steps, file-by-file plans, "how" rather than "what" — those belong in the PR description or get deleted in favor of writing the code. Even an "internal" refactor has a public surface (an imported function, a passed flag, a config key); the spec pins it so reviewers know what they're agreeing to. If you can't write a spec, you don't have a design yet.
If none apply, just open the PR — don't manufacture a design doc for a 50-line bug fix.
Seven phases. Confirm with the user at natural decision points (after Research, Draft, Spec, before Publish), but don't ask permission when the next step is obvious.
The user starts the skill with a framing paragraph stating what they want and why. If they didn't, query them — or infer it from rich prior conversation context. A one-sentence "fix the foo thing" is not enough; push back and ask for the why.
You infer the slug. Short, lowercase, underscores (finelog_lift, iris_autoscaler_refactor). State it in one line ("I'll save this as .agents/projects/<slug>/") and proceed — only stop if it collides with an existing directory, then propose a disambiguator.
Once you have a framing paragraph, proceed directly to research. Don't batch a long question list up front; that's what Interrogate is for.
Spawn an Explore subagent (do not search yourself — keep the digest out of main context). Brief it with the framing paragraph and ask for:
.agents/projects/ — read them, note overlap.gh if the user named any, plus a quick gh issue list --search on the topic.AGENTS.md "Code Reuse").For proposals that reinvent a category of system (logger, stats store, queue, scheduler, KV, service-discovery layer, workflow engine, etc.), also do a prior-art pass via web search — in parallel with the in-repo Explore. Spawn a general-purpose agent (has WebSearch/WebFetch) with a focused brief: what is the established shape of this kind of system, 2–4 representative implementations (OSS or well-known), and what design choices do they converge or disagree on? Cap to ~5 results, ask for a bulleted digest under 200 words. The point is to surface obvious patterns we'd reinvent badly and give reviewers reference points — not a literature review. Skip for in-repo refactors, internal API tweaks, or anything where the category is novel to the world.
Return a bulleted digest combining both passes: "in-repo findings, prior-art shape, what surprised me, what's still unclear." Ask whether the framing should shift before drafting.
Persist the research. Save the full digest (in-repo findings with file:line refs, prior-art digest, anything load-bearing that won't fit the 1-pager) to .agents/projects/<slug>/research.md. The design doc gets a short ## Background section (3–5 sentences) linking to research.md.
Ask 3–6 targeted questions in one batched message. Good questions surface things the doc must answer:
Bad questions are ones research could have answered — don't ask things you could grep for. Don't ask about backwards compatibility unless you have specific reason to think it matters — Marin generally does not optimize for it (per AGENTS.md "Deprecation"); default to assuming the proposal updates all call sites.
Read .agents/projects/design-template.md, fill in each section. Guidelines:
file.py:line paths from research, not placeholders. Convert load-bearing citations to commit-pinned permalinks before publishing — see "Linking conventions".Write the draft to .agents/projects/<slug>/design.md from the start and iterate on the file (it's the source of truth — conversation-only snippets are invisible to reviewers and diff tools). Summarize the diff inline as you go. Iterate until the user says the design is settled. Do not write spec.md yet — it derives from the stable design.
Once design.md is settled, write .agents/projects/<slug>/spec.md. This phase is non-negotiable; every design produces a spec. If you can't write one, the design isn't concrete enough — go back to Draft.
What goes in spec.md:
.proto content (name every RPC, message, field).lib/finelog/src/finelog/proto/finelog_stats.proto"). A summary table at the bottom is good.CREATE statements, on-disk layout, file naming, JSON/proto envelope formats.spec.md has no length cap. For genuinely tiny changes (one-function refactor, single config flag) it may be very short — a single signature with a docstring is a valid spec, but it still exists; writing it forces commitment to the surface. Write it to the file from the start, summarize contract decisions inline, iterate until settled.
Before publishing, hand both design.md and spec.md to a Plan agent (software architect). Reviewer prompt: "Review this design doc and its spec. Identify underspecified areas, weak motivation, missing tradeoffs, places where two reasonable engineers would implement different things, mismatches between the design's intent and the spec's contracts, and concrete suggestions for tightening the proposal."
When the reviewer returns:
Show the user a brief summary: what you incorporated (design vs spec), what you're punting, what needs their call.
Two actions, can run together. After this, the skill is done.
Commit and PR via the commit skill. Branch design/<slug>. Single commit adding the .agents/projects/<slug>/ directory (design.md, research.md, spec.md — all three always present). PR title [Design] <slug>. PR body is a short summary (3–6 sentences) — the framing paragraph plus the one-line gist — with explicit links to the three sibling files and a "Discussion welcome — see Open Questions in design.md" footer. Use absolute branch-rooted URLs for those links (relative paths 404 from PR descriptions — see "Linking conventions"). The full 1-pager lives in design.md on the branch; reviewers click through. Labels design and agent-generated.
Discord ping. Run python scripts/ops/discord.py --channel code-review with a 2-line message: PR title + URL + the framing paragraph (or a one-sentence compression). Send it; no need to confirm exact text unless asked.
Once both happen, you're done. Feedback lives on the PR; the user starts implementation in parallel; the 1-pager is a snapshot, not a living doc.
https://github.com/marin-community/marin/blob/<sha>/path#Lnnn (SHA from git rev-parse main). Plain path:line text drifts within days. Run a permalink pass at the end of Phase 4/5.https://github.com/marin-community/marin/blob/design/<slug>/.agents/projects/<slug>/design.md. Relative paths 404 from PR descriptions. Use the branch name (not a SHA) so the link follows future edits..agents/projects/design-template.md. Read it before drafting. Don't use other docs in .agents/projects/ as style references — they predate this skill.design label: create it if missing (gh label create design --description "Design doc / 1-pager for review").design.md, still write spec.md (Phase 5), and still run the Stress-test (Phase 6).fix-issue or commit for the work itself only if the user asks.