/grain:advise [--json] [--graph <dir>]from grain
What this repository's own history and imports say about the architecture graph it ALREADY has — places a finer cut beats, rules the graph could take on, and (as data, not advice) places that change together with nothing connecting them
Ships in grain. Installing the plugin adds it to Claude Code.
!node -e "const f=process.argv[1];if(!require('fs').existsSync(f)){console.error('grain: '+f+' is not reachable from this environment (a host path inside a container?), so grain did not run');process.exit(0)}const r=require('child_process').spawnSync(process.execPath,process.argv.slice(1),{stdio:'inherit'});process.exit(r.status===null?1:r.status)" "${CLAUDE_PLUGIN_ROOT}/bin/grain.mjs" advise $ARGUMENTS
The run above read the .yggdrasil/ graph this repository already has — it never proposes one, never
writes anything, and never touches the graph. (grain propose is the command for a repository that has no
graph yet; they are not the same thing and must not be offered as if they were.)
Three kinds of finding, and they carry very different weight. Relay them at the weight they have:
grain decide boundary) that the architecture does not make law yet: the item says which type would have to stop reaching which, which declared relation contradicts the decision, and how many imports cross it today. And a convention grain certified, which a check can hold, every site of it inside one node, and which no aspect of the graph states: the item carries the aspect grain would write, attached to that node — one item per rule, naming every node it holds in. Relay each as a draft for the user to accept or not; never write one into the graph. A boundary the architecture already forbids is counted as promoted, and grain no longer flags it at edit time, because yg check refuses it.--json and hand them over as data, with the
concentration figure attached.--json emits the whole grain-advice/1 document — every pair with both directional confidences, the two
declarations it was read from, the commit counts behind the rates, whether the graph declares the pair and how,
the split candidates with their evidence, and the rule drafts with theirs. That document is the machine surface another tool reads; the
text above is what a person reads.
--graph <dir> reads a hand-written graph held beside the repository instead of inside it — the shape a
scoring oracle has. Without a graph anywhere, the command says so and points at grain propose.
Do not edit the graph, and do not run any Yggdrasil command yourself. Changing an architecture graph is the user's decision.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub krzysztofdudek/grain --plugin grain23 commands in this plugin
/checkgrain check: $ARGUMENTSAsk the repo how a file — or your whole uncommitted change — sits against the local norm (deviations with evidence and exemplars)/cochangegrain cochange: $ARGUMENTSWhich parts of a set of files or graph nodes change together more often than chance, and how well a proposed cut of them into parts follows the seams the history shows/completenessgrain completeness: $ARGUMENTSAsk the repo which other files historically change together with the given file(s) — co-change, above a confidence floor/decidegrain decide: $ARGUMENTSRecord a maintainer decision — steer (promote a pattern), boundary (forbid an import direction), or waive (excuse one scope) — or list/withdraw one/explaingrain explain: $ARGUMENTSShow the full local-to-global convention lattice around one file (no acceptance cut)/exportgrain export: $ARGUMENTSDump the whole convention model as JSON (every convention with all its sites, anchors, trends, groups, markers, co-change) for pipelines and auditsOther plugins' commands for the same job