Docs wg

From gridaco/grida · View interactive version

Docs wg is an AI agent skill from the GitHub repository gridaco/grida. Doctrine for drafting and keeping working-group docs under `docs/wg/**` — RFC/RFD specs and findings/research/glossary. A WG doc is a language-agnostic, code-agnostic study of a domain: it argues *why* and defines *what*, never *how in our code*. Use when writing or editing anything under `docs/wg/`

How to use this skill

Skill file

WG docs

Working-group docs are where Grida reasons about a problem **before and

above** any one implementation. A good WG doc could be handed to someone

rebuilding the feature in a different language, on a different stack, in a

different decade, and still be the right starting point. That is the bar.

The reason WG docs are code-agnostic is not stylistic. Code moves; a file

path or a function name is stale within months, and a doc anchored to it

rots into a lie. A doc anchored to the _domain_ — the problem, the spec,

the why — stays true as long as the problem does. You are writing the

thing that outlives the code.

This skill is the doctrine. Operational mechanics (frontmatter,

format: md, draft/unlisted/doc_tasks, the sync model) live in

CODE0 — read it once. For _reading_

the WG tree before you edit, use CODE0.

The two genres

A WG doc is almost always one of these. Name which before you draft —

they have different shapes.

1. RFC / RFD — spec

A specification of _what a feature or system is_ and _why it is that

way_. Spec-rich. It defines vocabulary, states constraints and

invariants, and argues the design tradeoffs. It reads like a standards

document, not like a code comment.

canonical vocabulary, a small generating rule or set of invariants,

contract tables, and conformance clauses — the kind of thing a second

implementer runs in their head. A doc that _explains the code_ has the

arrow backwards: the code conforms to the spec, never the reverse.

Prose justifies the model; it does not substitute for it.

the chosen design and the alternatives rejected (and why).

contract, not the functions that will realize them. If you find

yourself naming a struct or a file, you have dropped from spec altitude

into implementation — climb back up.

implementer could honor, not in terms of the current one.

2. Findings / research / glossary

Grounded, concise domain knowledge — what is _true_ about the problem

space. A glossary that pins down vocabulary; findings that record what a

study established; research that surveys how the domain is understood.

standard, or a demonstrated result — not to a hunch or a memory.

by being correct and findable, not long.

The dedicated upstream-survey subtree is the engine repo's docs/wg/research/** (github.com/gridaco/nothing), and

it has its own stricter rules (pure survey, Grida absent from the body).

When writing there, use CODE0 — it governs

that subtree specifically. This skill governs the broader WG surface.

Name the genre — and don't let one wear another's costume. A cluster

also collects legitimate non-spec artifacts: methodology, a decision

record, an inventory, an RFD (a design proposal still under discussion).

Each is fine — but it must _say what it is_. An inventory or a

decision-memo dressed as a normative spec, numbered with "contracts" it

cannot enforce, misleads everyone who tries to conform to it. If a doc is

not a model, label it and drop the costume.

What a good WG doc is

its grounding.

of who implements it or in what.

understanding a feature or spec, covering _why_ and _what_.

may take a position and argue it. Taking a stance is allowed; the stance

must rest on fact.

What a bad WG doc is

These are not style nits — each one is the doc rotting or pointing the

reader wrong:

line numbers. They date the doc and pull it down to implementation

altitude. Describe the contract, not the call site.

_domain_, not some other project's take on it. Citing "how library X

does it" smuggles a foreign implementation in as if it were the spec.

or reference implementation of the _domain itself_ is fine and often

necessary — Chromium and the W3C/WHATWG specs for web rendering, for

example, _are_ the domain. The test: are you citing the standard, or

a project's opinion? Dedicated surveys of such sources belong in

docs/wg/research/** under CODE1.

half-formed task lists turn a reference into a scratchpad. Keep the doc

a clean statement of what is true and intended.

What is NOT a WG doc at all

These do not belong under docs/wg/ in any form. They are a different

kind of artifact:

gitignored on purpose (.gitignore) — they are

working scratch, not committed knowledge. A plan is about _the work_; a

WG doc is about _the thing_.

decided…" is process, not knowledge. Historical snapshots that must be

kept go under a _history/ folder marked unlisted: true (see

CODE0), never in the live spec.

contract to _one_ codebase — the concrete data an undo entry is, this

build's default keymap, the mapping from contracts to running code — is

code-specific by nature. It belongs _with the code_ (a docs/ folder in

the package or crate, next to what it binds), not under docs/wg. The

WG tree stays code-agnostic; the binding lives where it can name files

honestly and move with them.

The throughline: a WG doc states what is true and what is intended,

in domain terms, for a reader who arrives cold. Anything that is _about

the work_ rather than _about the thing_ is a different artifact.

One concept, one home

Where a doc lives is a design decision, not filing — and the WG tree only

stays honest as it grows if three rules hold.

implementation — selection, undo, snapping — is specified once, in the

cluster that owns the _domain_, and never re-homed per consumer. Two

clusters specifying "selection" under their own names is a smell: the

second is either duplication to delete or a _delta_ that should defer

(below). Name the home at the domain's natural scope, not an over-broad

umbrella: an "editor" cluster that quietly means the canvas editor is

misnamed — canvas is the honest home. (See CODE1.)

concept another doc owns, it _references_ the owner and specifies only

what it adds — it never restates the model. A disciplined delta ("the

golden spec owns the pointer routing; this owns the resolution math") is

not duplication; a restatement that drifts is. The test: could you

delete the section and replace it with a link without losing anything?

If yes, do.

convergence model, an undo-as-data study — that depth earns a

_dedicated study_, and the application-facing home _points to_ it rather

than swallowing it. The home reads at application altitude and links

out; the study is the source of truth and stays as pedantic as it needs

to be. Splitting by tone keeps the home approachable and the study

rigorous, each at its register.

Placement and upkeep

docs/wg/ai/, docs/wg/desktop/, and the product-side feat-* clusters

(feat-editor, feat-fig, feat-slides, feat-svg-editor). Put the doc

in the cluster that owns its topic; create a new feat-<topic>/ cluster

when none fits (consult CODE0 for the cluster name).

https://github.com/gridaco/nothing/tree/main/docs/wg (canvas, format,

research, and the engine feat-* clusters). A doc about the engine domain

does not get a new grida-side cluster.

hub so the cluster stays navigable — an orphaned doc is an unfindable

doc.

title, a description, tags: [internal, wg, <topic>…] drawn from

the controlled vocabulary in CODE0,

and format: md for plain-Markdown pages (the MDX-safety opt-out).

/docs, GitHub-absolute for anything outside /docs, universal /_/

routes for "open in the product."

Before you save — review

without reading our code? If not, you have implementation detail to

remove.

editor/, packages/. Each match must justify itself — usually by

being lifted to a domain-level statement.

standard? Reframe to the domain, or move a genuine survey to

research/.

it belongs in a plan, an issue, or _history/.

prose explaining code? If prose, lift it to a model — or, if it is

genuinely a non-spec genre, label it honestly.

only the delta. Is this the _one_ home for its concept, named at the

domain's scope, with deep material split into a study it points to?

Related skills

CODE0 (the family router — start there if unsure this

is even a WG doc), CODE0 (the research/

upstream-survey subtree), CODE0 (read and

reconcile before editing), CODE0,

CODE0 (cluster and concept names).

Operational mechanics: CODE0.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.