Skip to content

Commit f2d657c

Browse files
authored
Move grund.toml to the project roots (#1026)
* Move grund.toml to the project roots grund probes a bare `grund.toml` before `.agents/grund.toml`. Move all four configs — the workspace root and the common, native-gradle-plugin, and native-maven-plugin members — up to the project root each one configures, so they sit with the other top-level project files and match the layout grund uses in its own repo. The spec gate needs two matching edits. Its path filter named `.agents/grund.toml`, so it would have stopped triggering on config edits; and GRUND_VERSION was pinned to 0.5.0, which predates root discovery (grund 0.9.0) — a grund that finds no config exits 0 without checking anything, so the gate would have gone green while validating nothing. Bumping the pin surfaces a pre-existing failure: under 0.9.0 all four AGENTS.md files fail `grund check` with `outdated grund init block v3`. `grund init` refreshes them to v7, which spells the config path without the `.agents/` prefix, adds the BEGIN/END block markers, and adds the marker and clickable-citation paragraphs. Verified with grund 0.9.0: `grund check` and `grund fmt . --marker --cross-refs --check` both exit 0. Closes #1025 * Name the package when installing grund from git The grund repository now ships two binary packages, grund and grund-lsp, so `cargo install --git … --tag v0.9.0` fails with "multiple packages with binaries found" before it installs anything. Name the package explicitly.
1 parent 395d386 commit f2d657c

9 files changed

Lines changed: 45 additions & 17 deletions

File tree

.github/workflows/check-grund-spec.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
paths:
88
- 'docs/spec/**'
9-
- '.agents/grund.toml'
9+
- 'grund.toml'
1010
- '.pre-commit-config.yaml'
1111
- 'AGENTS.md'
1212
- 'common/**'
@@ -27,8 +27,8 @@ permissions:
2727
contents: read
2828

2929
env:
30-
# Bump to refresh the cached binary. Validated locally against grund 0.5.0.
31-
GRUND_VERSION: "0.5.0"
30+
# Bump to refresh the cached binary. Validated locally against grund 0.9.0.
31+
GRUND_VERSION: "0.9.0"
3232

3333
jobs:
3434
check-grund-spec:
@@ -49,10 +49,10 @@ jobs:
4949
if: steps.cache-grund.outputs.cache-hit != 'true'
5050
run: |
5151
rustup toolchain install stable --profile minimal
52-
rustup run stable cargo install --git https://github.com/vjovanov/grund --tag "v${GRUND_VERSION}"
52+
rustup run stable cargo install --git https://github.com/vjovanov/grund --tag "v${GRUND_VERSION}" grund
5353
- name: "✅ grund check"
5454
# Validates that every §<ID> citation in docs, workflows, and source doc-comments resolves,
55-
# and that section headings and inline-note limits hold. See AGENTS.md and .agents/grund.toml.
55+
# and that section headings and inline-note limits hold. See AGENTS.md and grund.toml.
5656
# The root workspace validates root, Gradle, and Maven namespaces together.
5757
run: |
5858
grund check

AGENTS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Native Build Tools — agent instructions
22

3-
## Grounding with grund (v3)
3+
<!-- BEGIN GRUND MANAGED BLOCK -->
4+
## Grounding with grund (v7)
45

5-
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, NGOAL, REQ, AR, FS, E2E, DEC, GLOSS}`), cited with the marker `§` — e.g. `FS-user-login.3.1` is the shape of a section ID, and a real citation prefixes that shape with `§`. Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `.agents/grund.toml`, so only `§`-prefixed citations are checked.
6+
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, NGOAL, REQ, AR, FS, E2E, DEC, GLOSS}`), cited with the marker `§` — e.g. `<§>FS-user-login.3.1` (the `FS-user-login` here is a shape illustration, not a real ID in this repo, hence the `<§>` escape). Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `grund.toml`, so only `§`-prefixed citations are checked.
67

78
### Grounding from a citation
89

@@ -31,7 +32,7 @@ A `§<ID>` is a pointer to a fact, not a file path. Resolve it with `grund` and
3132

3233
A namespace is a project boundary, not a docs folder. The current project is the local namespace: cite its IDs as `§<ID>`.
3334

34-
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `.agents/grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
35+
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
3536

3637
Do not create a namespace for a regular module or component that still belongs to this project. Cite across namespaces as `§alias/<ID>` and run `grund check` from the workspace root.
3738

@@ -52,6 +53,7 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
5253

5354
- **Spec first.** For behavior or design changes, write or update the most-specific spec point before code.
5455
- **Cite as you write.** Place `§<ID>` at the point a claim or behavior is made — on the doc-comment for a whole behavior, inline beside the clause it enforces.
56+
- **Marker = live citation.** A `§`-prefixed token resolves and is checked wherever it appears — including inside Markdown backticks. To mention an ID without citing it, write `<§><ID>`, omit the marker, or use a fenced code block.
5557
- **Inline citation style.** Inline notes: ≤ 1 line preferred, hard cap 12 lines; ≤ 160 columns.
5658
- **Always cite the most-specific point.**
5759

@@ -66,3 +68,8 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
6668
- **DEC** should cite */FS or */AR or */REQ or */GOAL or */NGOAL or */DEC.
6769
- **code** (any file outside a kind home) should cite */FS or */AR or */E2E.
6870
Unlisted kinds and pairs are fine.
71+
72+
### Clickable citations
73+
74+
On repository web surfaces, link `§<ID>` to the PR branch in PR bodies, the reviewed commit in reviews, an exact commit for permalinks, and the default branch otherwise; fall back to plain when unsure.
75+
<!-- END GRUND MANAGED BLOCK -->

common/AGENTS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Common Libraries — agent instructions
22

3-
## Grounding with grund (v3)
3+
<!-- BEGIN GRUND MANAGED BLOCK -->
4+
## Grounding with grund (v7)
45

5-
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, REQ, FS, AR, E2E}`), cited with the marker `§` — e.g. `FS-user-login.3.1` is the shape of a section ID, and a real citation prefixes that shape with `§`. Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `.agents/grund.toml`, so only `§`-prefixed citations are checked.
6+
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, REQ, FS, AR, E2E}`), cited with the marker `§` — e.g. `<§>FS-user-login.3.1` (the `FS-user-login` here is a shape illustration, not a real ID in this repo, hence the `<§>` escape). Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `grund.toml`, so only `§`-prefixed citations are checked.
67

78
### Grounding from a citation
89

@@ -28,7 +29,7 @@ A `§<ID>` is a pointer to a fact, not a file path. Resolve it with `grund` and
2829

2930
A namespace is a project boundary, not a docs folder. The current project is the local namespace: cite its IDs as `§<ID>`.
3031

31-
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `.agents/grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
32+
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
3233

3334
Do not create a namespace for a regular module or component that still belongs to this project. Cite across namespaces as `§alias/<ID>` and run `grund check` from the workspace root.
3435

@@ -49,6 +50,7 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
4950

5051
- **Spec first.** For behavior or design changes, write or update the most-specific spec point before code.
5152
- **Cite as you write.** Place `§<ID>` at the point a claim or behavior is made — on the doc-comment for a whole behavior, inline beside the clause it enforces.
53+
- **Marker = live citation.** A `§`-prefixed token resolves and is checked wherever it appears — including inside Markdown backticks. To mention an ID without citing it, write `<§><ID>`, omit the marker, or use a fenced code block.
5254
- **Inline citation style.** Inline notes: ≤ 1 line preferred, hard cap 12 lines; ≤ 160 columns.
5355
- **Always cite the most-specific point.**
5456

@@ -62,6 +64,11 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
6264
- **code** (any file outside a kind home) should cite */FS or */AR or */E2E.
6365
Unlisted kinds and pairs are fine.
6466

67+
### Clickable citations
68+
69+
On repository web surfaces, link `§<ID>` to the PR branch in PR bodies, the reviewed commit in reviews, an exact commit for permalinks, and the default branch otherwise; fall back to plain when unsure.
70+
<!-- END GRUND MANAGED BLOCK -->
71+
6572
## Local Grounding Notes
6673

6774
Repository-wide grounding, non-goals, shared plugin behavior, and CI remain in the `root`
File renamed without changes.

native-gradle-plugin/AGENTS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Native Gradle Plugin — agent instructions
22

3-
## Grounding with grund (v3)
3+
<!-- BEGIN GRUND MANAGED BLOCK -->
4+
## Grounding with grund (v7)
45

5-
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, REQ, FS, AR, E2E}`), cited with the marker `§` — e.g. `FS-user-login.3.1` is the shape of a section ID, and a real citation prefixes that shape with `§`. Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `.agents/grund.toml`, so only `§`-prefixed citations are checked.
6+
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, REQ, FS, AR, E2E}`), cited with the marker `§` — e.g. `<§>FS-user-login.3.1` (the `FS-user-login` here is a shape illustration, not a real ID in this repo, hence the `<§>` escape). Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `grund.toml`, so only `§`-prefixed citations are checked.
67

78
### Grounding from a citation
89

@@ -28,7 +29,7 @@ A `§<ID>` is a pointer to a fact, not a file path. Resolve it with `grund` and
2829

2930
A namespace is a project boundary, not a docs folder. The current project is the local namespace: cite its IDs as `§<ID>`.
3031

31-
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `.agents/grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
32+
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
3233

3334
Do not create a namespace for a regular module or component that still belongs to this project. Cite across namespaces as `§alias/<ID>` and run `grund check` from the workspace root.
3435

@@ -49,6 +50,7 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
4950

5051
- **Spec first.** For behavior or design changes, write or update the most-specific spec point before code.
5152
- **Cite as you write.** Place `§<ID>` at the point a claim or behavior is made — on the doc-comment for a whole behavior, inline beside the clause it enforces.
53+
- **Marker = live citation.** A `§`-prefixed token resolves and is checked wherever it appears — including inside Markdown backticks. To mention an ID without citing it, write `<§><ID>`, omit the marker, or use a fenced code block.
5254
- **Inline citation style.** Inline notes: ≤ 1 line preferred, hard cap 12 lines; ≤ 160 columns.
5355
- **Always cite the most-specific point.**
5456

@@ -62,6 +64,11 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
6264
- **code** (any file outside a kind home) should cite */FS or */AR or */E2E.
6365
Unlisted kinds and pairs are fine.
6466

67+
### Clickable citations
68+
69+
On repository web surfaces, link `§<ID>` to the PR branch in PR bodies, the reviewed commit in reviews, an exact commit for permalinks, and the default branch otherwise; fall back to plain when unsure.
70+
<!-- END GRUND MANAGED BLOCK -->
71+
6572
## Local Grounding Notes
6673

6774
Repository-wide grounding, non-goals, shared plugin behavior, and CI remain in the `root`

native-maven-plugin/AGENTS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Native Maven Plugin — agent instructions
22

3-
## Grounding with grund (v3)
3+
<!-- BEGIN GRUND MANAGED BLOCK -->
4+
## Grounding with grund (v7)
45

5-
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, REQ, FS, AR, E2E}`), cited with the marker `§` — e.g. `FS-user-login.3.1` is the shape of a section ID, and a real citation prefixes that shape with `§`. Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `.agents/grund.toml`, so only `§`-prefixed citations are checked.
6+
This project uses [`grund`](https://github.com/vjovanov/grund): every spec, goal, decision, and end-to-end test has a stable ID `<KIND>-<slug>[.<section>]` (`KIND ∈ {GRUND, GOAL, REQ, FS, AR, E2E}`), cited with the marker `§` — e.g. `<§>FS-user-login.3.1` (the `FS-user-login` here is a shape illustration, not a real ID in this repo, hence the `<§>` escape). Type `$$` in a grund-aware editor and it becomes `§`. Bare ID-shaped tokens are ignored — `[reference] strict = true` is set in `grund.toml`, so only `§`-prefixed citations are checked.
67

78
### Grounding from a citation
89

@@ -28,7 +29,7 @@ A `§<ID>` is a pointer to a fact, not a file path. Resolve it with `grund` and
2829

2930
A namespace is a project boundary, not a docs folder. The current project is the local namespace: cite its IDs as `§<ID>`.
3031

31-
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `.agents/grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
32+
Create or use a separate namespace when work introduces an independently checked app, package, service, or subproject. Give that project its own `grund.toml`, add it to the workspace root's `[workspace] members`, run `grund init` there, and set a stable `project_name`.
3233

3334
Do not create a namespace for a regular module or component that still belongs to this project. Cite across namespaces as `§alias/<ID>` and run `grund check` from the workspace root.
3435

@@ -49,6 +50,7 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
4950

5051
- **Spec first.** For behavior or design changes, write or update the most-specific spec point before code.
5152
- **Cite as you write.** Place `§<ID>` at the point a claim or behavior is made — on the doc-comment for a whole behavior, inline beside the clause it enforces.
53+
- **Marker = live citation.** A `§`-prefixed token resolves and is checked wherever it appears — including inside Markdown backticks. To mention an ID without citing it, write `<§><ID>`, omit the marker, or use a fenced code block.
5254
- **Inline citation style.** Inline notes: ≤ 1 line preferred, hard cap 12 lines; ≤ 160 columns.
5355
- **Always cite the most-specific point.**
5456

@@ -62,6 +64,11 @@ Declarations are heading lines `# FS-user-login: …` in markdown. In a code doc
6264
- **code** (any file outside a kind home) should cite */FS or */AR or */E2E.
6365
Unlisted kinds and pairs are fine.
6466

67+
### Clickable citations
68+
69+
On repository web surfaces, link `§<ID>` to the PR branch in PR bodies, the reviewed commit in reviews, an exact commit for permalinks, and the default branch otherwise; fall back to plain when unsure.
70+
<!-- END GRUND MANAGED BLOCK -->
71+
6572
## Local Grounding Notes
6673

6774
Repository-wide grounding, non-goals, shared plugin behavior, and CI remain in the `root`

0 commit comments

Comments
 (0)