Research upstream and peer projects to inform Grida's design and implementation. Use when investigating how Chromium, Skia, Servo, Taffy, or peer canvas editors solve a problem before writing code. Covers source-code exploration and research document authoring under docs/wg/research/.
Local clones (optional): If ~/Documents/GitHub/ exists, it may contain default-style clones (sibling dirs named by repo, e.g. skia). Prefer searching there before cloning or using only the web.
Searching large repos: use https://source.chromium.org/ for Chromium. Narrow to cc/layers/cc/tiles/cc/trees/ (compositing), cc/paint/ (recording), cc/scheduler/ (frame scheduling). Servo: components/style/properties/, components/style/stylist.rs, components/layout/. Skia: include/core/include/effects/, GPU in src/gpu/ganesh/ (GL) or src/gpu/graphite/ (Metal/Vulkan).
The Research Workflow
Frame the question. Specific and bounded. Bad: "how does Chromium handle rendering?" Good: "how does Chromium decide which layers get their own composited surface?"
Check existing knowledge in docs/wg/research/ and code comments before going upstream.
Explore the source with targeted searches — never read entire codebases:
A research document is a pure survey of how upstream solves a problem. It describes
the upstream system on its own terms, in enough depth that a reader could reimplement
the design from the doc alone. It is not a plan, a proposal, or a gap analysis —
Grida should be essentially absent from these pages.
Docs live in docs/wg/research/<project>/. Create new subdirectories as needed (servo/, skia/).
Stay in survey mode
Write as if Grida did not exist. The reader is someone trying to understand the upstream project — Chromium, Skia, Servo, etc. — not someone planning a Grida change. Concretely:
Frame in upstream terms. "Blink resolves clip-path by..." (✅) — not "Blink does X, which is what we'd need..." (❌).
Use upstream names for types, files, functions, constants.
Quote the spec, the source, the upstream commit. Anchor every claim to a file path or spec section.
Compare upstream to upstream. Chromium vs. resvg vs. Servo belongs here; Chromium vs. Grida does not.
Spec gotchas, magic numbers, edge cases are on-topic — they explain the upstream design.
Keep Grida out of the body
Forbidden in research docs:
"Relevance to Grida" / "What we borrow" / "What we differ on" sections.
Citations of crates/grida/... or any in-repo file path.
"Plan for our implementation" / "Implementation checklist" sections.
Sentences using "we", "our renderer", "our codebase", or "our fix" for Grida-side work.
"This is the gap blocking N fixtures" intros, "TODO" lists, "where the fix lands" footers.
A neutral "the Rust binding for this Skia API is skia_safe::FooBar" is fine — it surveys the primitive. Becomes off-limits the moment the sentence ties it to Grida ("we use this at filename.rs:42").
Required structure
Title and scope — what subsystem, what questions it answers (in upstream terms).
Architecture description — how the upstream subsystem works, with diagrams for pipelines.
Key data structures — important types and relationships (use upstream names).
Constants and heuristics — magic numbers and their reasoning.
Cross-project comparison (when relevant) — Chromium vs. resvg vs. Servo vs. Skia, each on its own terms.
Conventions: Upstream terminology. Short code excerpts (5–15 lines) with file path citations. Organize by concept, not by file. Update index.md when adding new docs. File names: lowercase, hyphenated, topic-descriptive.
Review your draft before saving
Treat this as a required step — past drafts have repeatedly slipped Grida-side content into research, and it's cheapest to catch right before save:
Search for Grida, grida, crates/grida, our , we , we'd, we have, we use. Every match must justify itself — usually by being removed.
Skim for headings like "Relevance to ...", "What we borrow", "What we differ on", "Plan for ...", "Implementation checklist", "Where our code is wrong". Delete them.
Check the intro and conclusion. Framed around an upstream question, or around a Grida gap? Reframe to upstream.
Check "See also" / "References". Internal Grida paths there are a smell.
If the doc would be useless to a reader who didn't know Grida exists, it isn't a research doc yet. Move the Grida-side content out.
If you find yourself wanting to write "and here's how this maps to our renderer", stop — that's not what a research doc is for.
Pitfalls
Writing a Grida-flavored survey. Most common failure mode — the brief is "research X" and the agent writes a survey ending in "here's how we should do it". Stay in survey mode.
Researching what's already documented. Check docs/wg/research/ and code comments first. The Chromium research alone is 15 documents.
Reading too broadly. Arrive with a specific question, find the code path, extract the answer, leave. Use source.chromium.org.
Confusing Skia docs with Skia behavior. Skia's documentation is minimal and sometimes wrong. Read the implementation.
Stale source references. Reference stable concepts (struct names, enum variants) over line numbers.
Mixing terminologies. Research docs: upstream terms. Code comments: Grida terms with parenthetical upstream reference.
Checklist
Framed a specific, bounded question
Checked existing research and code comments
Identified the right repo and narrowed to specific directories
Extracted findings with file paths, rationale, and constants
Wrote the research doc as a pure upstream survey — no Grida content
Reviewed the draft against the review checklist — searched for Grida, our, we; deleted any planning sections
Updated index.md if a new research doc was created
1---2name: research3description: Research upstream and peer projects to inform Grida's design and implementation. Use when investigating how Chromium, Skia, Servo, Taffy, or peer canvas editors solve a problem before writing code. Covers source-code exploration and research document authoring under docs/wg/research/.4---56# Code Research Skill78Workflow for going from "how does X work?" to a documented survey9grounded in prior art from upstream and peer projects.1011## When to Use This Skill1213- Investigating how a browser engine solves a rendering/layout/compositing problem14- Looking up undocumented Skia API behavior15- Understanding CSS feature semantics before adding support16- Comparing canvas editor architectures (excalidraw, tldraw)17- Writing or extending `docs/wg/research/` documents1819---2021## How to Orient Yourself2223Before touching any external repo, check what Grida already knows.2425| What you need | How to find it |26| ---------------------------- | ------------------------------------------------------------- |27| Existing research on a topic | `docs/wg/research/chromium/index.md` (topic map) |28| Code that cites sources | `grep "based on\|adapted from\|ported from" --include="*.rs"` |29| Vendored third-party code | `ls third_party/` |30| Feature docs for a subsystem | `ls docs/wg/feat-*/` |3132If already documented, cite it and move on.3334---3536## Reference Repositories3738**Local clones (optional):** If `~/Documents/GitHub/` exists, it may contain default-style clones (sibling dirs named by repo, e.g. `skia`). Prefer searching there before cloning or using only the web.3940| Repo | Lang | When to reference | Key paths |41| ------------------------------------------------------ | ---- | ----------------------------------------------------------------------------- | ----------------------------------------------------- |42| [chromium](https://github.com/chromium/chromium) | C++ | Skia usage, compositing, layer trees, paint scheduling, tiling, GPU resources | `cc/` `third_party/blink/renderer/` `components/viz/` |43| [skia](https://github.com/google/skia) | C++ | Undocumented API behavior, GPU internals, filter details | `src/gpu/` `src/core/` `src/effects/` |44| [rust-skia](https://github.com/rust-skia/rust-skia) | Rust | Rust binding ergonomics — our direct `skia-safe` dependency | `skia-safe/src/` |45| [resvg](https://github.com/linebender/resvg) | Rust | SVG rendering, path conversion, filter effects | `crates/resvg/src/` `crates/usvg/src/` |46| [servo](https://github.com/servo/servo) | Rust | CSS layout, DOM, Rust browser-engine patterns. We vendor its style system | `components/style/` `components/layout/` |47| [stylo](https://github.com/servo/stylo) | Rust | CSS parsing and style resolution | `style/` |48| [taffy](https://github.com/DioxusLabs/taffy) | Rust | Flexbox/Grid layout algorithms | `src/tree/` `src/compute/` `src/style/` |49| [excalidraw](https://github.com/excalidraw/excalidraw) | TS | Canvas API optimization, rendering heuristics, interaction | `packages/excalidraw/renderer/` |50| [tldraw](https://github.com/tldraw/tldraw) | TS | CRDT state model, modular SDK, DOM/SVG canvas | `packages/editor/` `packages/store/` |5152**Searching large repos:** use https://source.chromium.org/ for Chromium. Narrow to `cc/layers/` `cc/tiles/` `cc/trees/` (compositing), `cc/paint/` (recording), `cc/scheduler/` (frame scheduling). Servo: `components/style/properties/`, `components/style/stylist.rs`, `components/layout/`. Skia: `include/core/` `include/effects/`, GPU in `src/gpu/ganesh/` (GL) or `src/gpu/graphite/` (Metal/Vulkan).5354---5556## The Research Workflow57581. **Frame the question.** Specific and bounded. Bad: "how does Chromium handle rendering?" Good: "how does Chromium decide which layers get their own composited surface?"592. **Check existing knowledge** in `docs/wg/research/` and code comments before going upstream.603. **Explore the source** with targeted searches — never read entire codebases:61 ```sh62 grep "struct LayerTreeHost" --include="*.h" -r cc/ # owning type63 grep "ShouldCreateRenderSurface" --include="*.cc" -r cc/ # decision points64 grep "kDefault.*Tile\|kMax.*Memory" --include="*.h" -r cc/ # design constants65 ```664. **Extract findings:** **what** (mechanism + file path), **why** (rationale), **constants** (thresholds/heuristics).675. **Document:**6869| Scope | Action |70| ---------------------------- | --------------------------------------------- |71| Quick answer | Code comment citing the source |72| Reusable subsystem knowledge | Research doc in `docs/wg/research/<project>/` |73| Confirming existing approach | Update the relevant research doc |7475---7677## Writing Research Documents7879> **A research document is a pure survey of how upstream solves a problem.** It describes80> the upstream system on its own terms, in enough depth that a reader could reimplement81> the design from the doc alone. It is **not** a plan, a proposal, or a gap analysis —82> Grida should be essentially absent from these pages.8384Docs live in `docs/wg/research/<project>/`. Create new subdirectories as needed (`servo/`, `skia/`).8586### Stay in survey mode8788Write as if Grida did not exist. The reader is someone trying to understand the upstream project — Chromium, Skia, Servo, etc. — not someone planning a Grida change. Concretely:8990- **Frame in upstream terms.** "Blink resolves `clip-path` by..." (✅) — not "Blink does X, which is what we'd need..." (❌).91- **Use upstream names** for types, files, functions, constants.92- **Quote the spec, the source, the upstream commit.** Anchor every claim to a file path or spec section.93- **Compare upstream to upstream.** Chromium vs. resvg vs. Servo belongs here; Chromium vs. Grida does not.94- **Spec gotchas, magic numbers, edge cases** are on-topic — they explain the upstream design.9596### Keep Grida out of the body9798Forbidden in research docs:99100- "Relevance to Grida" / "What we borrow" / "What we differ on" sections.101- Citations of `crates/grida/...` or any in-repo file path.102- "Plan for our implementation" / "Implementation checklist" sections.103- Sentences using "we", "our renderer", "our codebase", or "our fix" for Grida-side work.104- "This is the gap blocking N fixtures" intros, "TODO" lists, "where the fix lands" footers.105106A neutral "the Rust binding for this Skia API is `skia_safe::FooBar`" is fine — it surveys the primitive. Becomes off-limits the moment the sentence ties it to Grida ("we use this at filename.rs:42").107108### Required structure1091101. **Title and scope** — what subsystem, what questions it answers (in upstream terms).1112. **Source references** — upstream file paths (with commit hash if volatile).1123. **Architecture description** — how the upstream subsystem works, with diagrams for pipelines.1134. **Key data structures** — important types and relationships (use upstream names).1145. **Constants and heuristics** — magic numbers and their reasoning.1156. **Cross-project comparison** (when relevant) — Chromium vs. resvg vs. Servo vs. Skia, each on its own terms.116117**Conventions:** Upstream terminology. Short code excerpts (5–15 lines) with file path citations. Organize by concept, not by file. Update `index.md` when adding new docs. File names: lowercase, hyphenated, topic-descriptive.118119### Review your draft before saving120121Treat this as a required step — past drafts have repeatedly slipped Grida-side content into research, and it's cheapest to catch right before save:122123- [ ] Search for `Grida`, `grida`, `crates/grida`, `our `, `we `, `we'd`, `we have`, `we use`. Every match must justify itself — usually by being removed.124- [ ] Skim for headings like "Relevance to ...", "What we borrow", "What we differ on", "Plan for ...", "Implementation checklist", "Where our code is wrong". Delete them.125- [ ] Check the intro and conclusion. Framed around an upstream question, or around a Grida gap? Reframe to upstream.126- [ ] Check "See also" / "References". Internal Grida paths there are a smell.127- [ ] If the doc would be useless to a reader who didn't know Grida exists, it isn't a research doc yet. Move the Grida-side content out.128129If you find yourself wanting to write "and here's how this maps to our renderer", stop — that's not what a research doc is for.130131---132133## Pitfalls134135- **Writing a Grida-flavored survey.** Most common failure mode — the brief is "research X" and the agent writes a survey ending in "here's how we should do it". Stay in survey mode.136- **Researching what's already documented.** Check `docs/wg/research/` and code comments first. The Chromium research alone is 15 documents.137- **Reading too broadly.** Arrive with a specific question, find the code path, extract the answer, leave. Use source.chromium.org.138- **Confusing Skia docs with Skia behavior.** Skia's documentation is minimal and sometimes wrong. Read the implementation.139- **Stale source references.** Reference stable concepts (struct names, enum variants) over line numbers.140- **Mixing terminologies.** Research docs: upstream terms. Code comments: Grida terms with parenthetical upstream reference.141142---143144## Checklist145146- [ ] Framed a specific, bounded question147- [ ] Checked existing research and code comments148- [ ] Identified the right repo and narrowed to specific directories149- [ ] Extracted findings with file paths, rationale, and constants150- [ ] Wrote the research doc as a pure upstream survey — no Grida content151- [ ] **Reviewed the draft** against the [review checklist](#review-your-draft-before-saving) — searched for `Grida`, `our`, `we`; deleted any planning sections152- [ ] Updated `index.md` if a new research doc was created
Run npx skillmds@latest add gridaco/research in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Research upstream and peer projects to inform Grida's design and implementation. Use when investigating how Chromium, Skia, Servo, Taffy, or peer canvas editors solve a problem before writing code. Covers source-code exploration and research document authoring under docs/wg/research/. It is listed under Research & Search on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
gridaco (@gridaco) published this skill. Their other Agent Skills are listed on their SkillMD profile.