Skip to content

Commit c5caa98

Browse files
committed
Add consumer wiki documentation
1 parent 0a89ee4 commit c5caa98

18 files changed

Lines changed: 1271 additions & 32 deletions

.agents/sow/SOW-status.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ Last updated: 2026-06-08
4040
- SOW-0098 - Rust Legacy Core Duplication Debt: open. Follow-up from SOW-0096
4141
to analyze and reduce real Rust `jf`/`journal-core` duplication only where
4242
shared primitives preserve historical compatibility and reader performance.
43-
- SOW-0100 - Consumer Docs And GitHub Wiki Publication: open. Add committed
44-
`docs/` GitHub wiki source, publish it to the GitHub wiki on trusted
45-
`master` merges, and document SDK API layers, hot paths, performance-sensitive
46-
options, production recommendations, and anti-patterns.
4743

4844
## Recently Closed Or Completed
4945

46+
- SOW-0100 - Consumer Docs And GitHub Wiki Publication: completed. Added
47+
committed `docs/` GitHub wiki source, a PR-safe validator/publish workflow
48+
using `GITHUB_TOKEN`, local docs validation, and consumer documentation for
49+
SDK API layers, hot paths, performance-sensitive options, production
50+
recommendations, and anti-patterns.
5051
- SOW-0099 - Rust crates.io Publication: completed. Rust SDK packages were
5152
published to crates.io at `0.6.0` under `systemd-journal-sdk` and
5253
project-prefixed internal package names; release tags are created on the SOW

.agents/sow/pending/SOW-0100-20260608-consumer-docs-github-wiki.md renamed to .agents/sow/done/SOW-0100-20260608-consumer-docs-github-wiki.md

Lines changed: 129 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Status
44

5-
Status: open
5+
Status: completed
66

7-
Sub-state: requirements captured; implementation not started.
7+
Sub-state: completed after local validation and whole-SOW reviewer rerun.
88

99
## Requirements
1010

@@ -182,9 +182,21 @@ Artifact impact plan:
182182

183183
Open-source reference evidence:
184184

185-
- No external repository was checked yet. Implementation should inspect current
186-
GitHub Actions documentation and, if useful, comparable wiki publish workflows
187-
from open-source repositories.
185+
- GitHub documentation was checked for wiki and Actions behavior:
186+
- GitHub Docs, `communities/documenting-your-project-with-wikis/about-wikis`:
187+
wikis host long-form project documentation, can be edited locally, and are
188+
public or private according to repository access.
189+
- GitHub Docs,
190+
`communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages`:
191+
wikis are Git repositories and can be cloned with
192+
`https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.wiki.git` after the first
193+
wiki page exists.
194+
- GitHub Docs, `actions/concepts/security/github_token`: `GITHUB_TOKEN`
195+
permissions are limited to the repository that contains the workflow.
196+
- Related repository pattern checked read-only:
197+
- `netdata/ai-agent`, `.github/workflows/wiki-sync.yml`: checks out
198+
`${{ github.repository }}.wiki` with `actions/checkout` and
199+
`token: ${{ secrets.GITHUB_TOKEN }}`, with job-level `contents: write`.
188200

189201
Open decisions:
190202

@@ -245,78 +257,168 @@ Failure handling:
245257

246258
- Created the SOW from the user's documentation and GitHub wiki publication
247259
request.
260+
- Activated the SOW for local implementation.
261+
- Added the committed `docs/` GitHub wiki source, wiki publication workflow,
262+
and local wiki docs validator.
263+
- Replaced the initial dedicated-token wiki publish design with the
264+
`GITHUB_TOKEN`-based wiki checkout pattern already used in `netdata/ai-agent`.
265+
- Added an explicit options reference page so performance-sensitive options are
266+
visible in one place.
267+
- First reviewer pass found documentation ambiguity and workflow hardening
268+
issues. Fixed policy-name mapping, Rust low-level type locations, PR-time
269+
docs validation, pinned checkout actions, missing-`docs/` publish guard,
270+
Node/Python performance warnings, `documentation/` vs `docs/` scope, reader
271+
facade hot-path wording, Explorer anchor wording, and validator edge cases.
248272

249273
## Validation
250274

251275
Acceptance criteria evidence:
252276

253-
- Pending.
277+
- `docs/` contains GitHub wiki source pages:
278+
- `Home.md`
279+
- `_Sidebar.md`
280+
- `Getting-Started.md`
281+
- `Rust-Crates-And-Packages.md`
282+
- `Reader-APIs.md`
283+
- `Writer-APIs.md`
284+
- `Explorer-And-Netdata-Queries.md`
285+
- `Hot-Path-Guide.md`
286+
- `Production-Profiles.md`
287+
- `Options-Reference.md`
288+
- `Wiki-Publishing.md`
289+
- `.github/workflows/wiki.yml` publishes `docs/` to
290+
`${{ github.repository }}.wiki` on trusted `master` pushes using the
291+
`GITHUB_TOKEN` pattern already used by `netdata/ai-agent`.
292+
- `README.md` points consumers to `docs/Home.md`.
293+
- `.agents/sow/specs/product-scope.md` records `docs/` as the committed
294+
consumer documentation and wiki source.
254295

255296
Tests or equivalent validation:
256297

257-
- Pending.
298+
- `python3 tests/docs/check_wiki_docs.py`: passed; validates 11 wiki Markdown
299+
files.
300+
- Workflow YAML parse for all `.github/workflows/*.yml`: passed.
301+
- Sensitive/local-path scan over changed durable artifacts: passed; no raw
302+
token assignments, local user path, or personal-name artifacts found.
303+
- `git diff --check`: passed.
258304

259305
Real-use evidence:
260306

261-
- Pending.
307+
- Full GitHub wiki publication cannot be executed locally. The workflow matches
308+
the known working pattern from `netdata/ai-agent` and will be validated by
309+
the first trusted `master` workflow run after merge/push.
262310

263311
Reviewer findings:
264312

265-
- Pending.
313+
- First pass, `llm-netdata-cloud/glm-5.1`: PRODUCTION GRADE with minor
314+
documentation concerns. Disposition: fixed Rust low-level type location
315+
wording and pinned checkout actions.
316+
- First pass, `llm-netdata-cloud/kimi-k2.6`: unavailable because the provider
317+
returned a usage-limit error. Disposition: recorded as unavailable; no result
318+
was fabricated.
319+
- First pass, `llm-netdata-cloud/mimo-v2.5-pro`: NOT PRODUCTION GRADE.
320+
Findings: language-neutral field policy names looked like exact API names;
321+
PR-time docs validation was missing; Node/Python performance warning was too
322+
vague. Disposition: fixed with spec/Rust/Go policy-name mapping, split
323+
validate/publish workflow jobs, and measured performance warning text.
324+
- First pass, `llm-netdata-cloud/minimax-m3-coder`: PRODUCTION GRADE with
325+
minor recommendations. Disposition: pinned checkout actions and verified the
326+
required wiki pages list already includes `_Sidebar.md`.
327+
- First pass, `llm-netdata-cloud/deepseek-v4-pro`: NOT PRODUCTION GRADE.
328+
Findings: `SealOptions` / writer-lock Rust locations were ambiguous, checkout
329+
actions were not pinned, and `documentation/` vs `docs/` scope was not clear.
330+
Disposition: fixed docs and workflow.
331+
- First pass, `llm-netdata-cloud/qwen3.6-plus`: NOT PRODUCTION GRADE.
332+
Findings: field policy names were ambiguous, wiki publish should fail before
333+
wiping if `docs/` is missing, validator should handle forbidden-text and
334+
query-string link edge cases, reader facade hot-path wording needed more
335+
nuance, and Explorer anchor behavior was not documented. Disposition: fixed.
336+
- Second pass, `llm-netdata-cloud/glm-5.1`: PRODUCTION GRADE.
337+
Disposition: no blocking findings; minor observations were non-blocking.
338+
- Second pass, `llm-netdata-cloud/kimi-k2.6`: unavailable because the provider
339+
returned the same usage-limit error. Disposition: recorded as unavailable; no
340+
result was fabricated.
341+
- Second pass, `llm-netdata-cloud/mimo-v2.5-pro`: PRODUCTION GRADE.
342+
Disposition: low/info observations only; no blocking fix required.
343+
- Second pass, `llm-netdata-cloud/qwen3.6-plus`: PRODUCTION GRADE.
344+
Disposition: low observations only; no blocking fix required.
345+
- Second pass, `llm-netdata-cloud/minimax-m3-coder`: PRODUCTION GRADE.
346+
Disposition: minor observations only; no blocking fix required.
347+
- Second pass, `llm-netdata-cloud/deepseek-v4-pro`: PRODUCTION GRADE.
348+
Disposition: no blocking findings; minor observations were non-blocking.
266349

267350
Same-failure scan:
268351

269-
- Pending.
352+
- Checked existing repo docs/workflows and the related `netdata/ai-agent`
353+
wiki sync workflow. The relevant existing pattern uses `GITHUB_TOKEN`, not a
354+
custom wiki token.
270355

271356
Sensitive data gate:
272357

273-
- Pending.
358+
- Passed. No raw secrets or local personal paths were written. The workflow
359+
uses `secrets.GITHUB_TOKEN` only through `actions/checkout`.
274360

275361
Artifact maintenance gate:
276362

277-
- AGENTS.md: Pending.
278-
- Runtime project skills: Pending.
279-
- Specs: Pending.
280-
- End-user/operator docs: Pending.
281-
- End-user/operator skills: Pending.
282-
- SOW lifecycle: Pending.
283-
- SOW-status.md: Pending.
363+
- AGENTS.md: no update needed; repository-wide workflow rules did not change.
364+
- Runtime project skills: no update needed; release/orchestration process did
365+
not change.
366+
- Specs: updated `.agents/sow/specs/product-scope.md`.
367+
- End-user/operator docs: added `docs/` wiki pages and README pointer.
368+
- End-user/operator skills: no output/reference skills exist for this SDK.
369+
- SOW lifecycle: SOW moved from `pending/` to `current/` for implementation
370+
and then to `done/` for completion.
371+
- SOW-status.md: updated root and canonical ledgers for completed state.
284372

285373
Specs update:
286374

287-
- Pending.
375+
- Updated `.agents/sow/specs/product-scope.md` with consumer documentation and
376+
wiki source contract.
288377

289378
Project skills update:
290379

291-
- Pending.
380+
- No project skill update required. This SOW adds consumer docs and a CI wiki
381+
sync workflow; it does not change how future assistants perform repository
382+
work beyond normal SOW artifact maintenance.
292383

293384
End-user/operator docs update:
294385

295-
- Pending.
386+
- Added 11 wiki source pages under `docs/` and linked them from `README.md`.
296387

297388
End-user/operator skills update:
298389

299-
- Pending.
390+
- No output/reference skills exist for this SDK, so none were affected.
300391

301392
Lessons:
302393

303-
- Pending.
394+
- Wiki publication workflows are easier to reason about when validation and
395+
publishing are separate jobs. Pull requests should validate docs, while only
396+
trusted branch events publish.
397+
- Consumer docs should separate language-neutral spec names from exact
398+
per-language API identifiers.
304399

305400
Follow-up mapping:
306401

307-
- Pending.
402+
- No follow-up is required from this SOW. Reviewers raised only non-blocking
403+
observations after the second pass.
308404

309405
## Outcome
310406

311-
Pending.
407+
Completed. The repository now has a committed `docs/` GitHub wiki source,
408+
local docs validation, and a secure wiki publication workflow that validates
409+
pull requests and publishes from trusted non-PR events with `GITHUB_TOKEN`.
312410

313411
## Lessons Extracted
314412

315-
Pending.
413+
- Split validation and publication jobs for documentation publishing workflows.
414+
This lets pull requests prove docs health without exposing write-capable
415+
publication steps.
416+
- Use language-neutral spec names only when the docs also show exact
417+
per-language API identifiers.
316418

317419
## Followup
318420

319-
None yet.
421+
None.
320422

321423
## Regression Log
322424

.agents/sow/specs/product-scope.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ Netdata Rust integrations:
3333
- `systemd-journal-sdk-index`
3434
- `systemd-journal-sdk-engine`
3535

36+
## Consumer Documentation
37+
38+
Committed consumer documentation lives under `docs/` as GitHub wiki source.
39+
The docs explain package selection, reader and writer API layers, Explorer and
40+
Netdata-shaped query APIs, hot-path behavior, production profiles, and options
41+
that can make a consumer accidentally leave the optimized path. The repository
42+
publishes these pages to the GitHub wiki on trusted `master` pushes through the
43+
wiki publication workflow.
44+
3645
## Delivery Priority
3746

3847
- Current exception: Rust writer parity/API work in SOW-0037 is allowed before

.github/workflows/wiki.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Publish Wiki
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- docs/**
9+
- tests/docs/check_wiki_docs.py
10+
- .github/workflows/wiki.yml
11+
pull_request:
12+
paths:
13+
- docs/**
14+
- tests/docs/check_wiki_docs.py
15+
- .github/workflows/wiki.yml
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
concurrency:
22+
group: wiki-${{ github.ref }}
23+
cancel-in-progress: false
24+
25+
jobs:
26+
validate:
27+
name: Validate wiki docs
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 5
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
34+
with:
35+
persist-credentials: false
36+
37+
- name: Validate wiki docs
38+
run: python3 tests/docs/check_wiki_docs.py
39+
40+
publish:
41+
name: Publish docs to GitHub wiki
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 10
44+
needs: validate
45+
if: github.event_name != 'pull_request' && github.repository == 'netdata/systemd-journal-sdk'
46+
permissions:
47+
contents: write
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
52+
with:
53+
persist-credentials: false
54+
55+
- name: Checkout wiki
56+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
57+
with:
58+
repository: ${{ github.repository }}.wiki
59+
path: wiki
60+
token: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Publish wiki
63+
run: |
64+
set -euo pipefail
65+
66+
wiki_dir="wiki"
67+
if [ ! -d docs ]; then
68+
echo "docs/ is required for wiki publication." >&2
69+
exit 1
70+
fi
71+
72+
find "${wiki_dir}" -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
73+
cp -R docs/. "${wiki_dir}/"
74+
75+
cd "${wiki_dir}"
76+
git config user.name "GitHub Actions"
77+
git config user.email "actions@github.com"
78+
79+
git add -u -- .
80+
find . -mindepth 1 -maxdepth 1 ! -name .git -print0 | xargs -0 --no-run-if-empty git add --
81+
82+
if git diff --cached --quiet; then
83+
echo "Wiki is already up to date."
84+
exit 0
85+
fi
86+
87+
git commit -m "Update consumer wiki"
88+
git push

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ explicit accepted reason.
5656
Shared tests, interoperability matrices, corpus evaluation tooling, and
5757
benchmarks live under `tests/`.
5858

59+
## Documentation
60+
61+
Consumer documentation lives under `docs/` and is published to the repository
62+
GitHub wiki. Start with [docs/Home.md](docs/Home.md) for API selection,
63+
hot-path guidance, production profiles, and wiki publishing details.
64+
65+
The `documentation/` directory contains project/internal operational notes.
66+
It is not the consumer wiki source.
67+
5968
## Rust Package
6069

6170
The Rust SDK is published as the crates.io package `systemd-journal-sdk`.

SOW-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ is `.agents/sow/SOW-status.md`; if summaries differ, the canonical ledger wins.
2020
- `SOW-0094-20260606-rust-explorer-lazy-compressed-field-inference.md` - open. Deferred Rust Explorer optimization experiment for compressed DATA field inference and delayed decompression.
2121
- `SOW-0097-20260607-go-codacy-metric-debt-refactor.md` - open. Follow-up from the Codacy Rust/Go metrics audit for Go production file-size/ownership and duplication reduction.
2222
- `SOW-0098-20260607-rust-legacy-core-duplication-debt.md` - open. Follow-up from the Codacy Rust/Go metrics audit for real Rust `jf`/`journal-core` duplication reduction.
23-
- `SOW-0100-20260608-consumer-docs-github-wiki.md` - open. Create committed `docs/` GitHub wiki source, publish it to the GitHub wiki on trusted `master` merges, and document SDK API layers, hot paths, performance-sensitive options, recommendations, and anti-patterns.
2423

2524
## Done
2625

26+
- `SOW-0100-20260608-consumer-docs-github-wiki.md` - completed. Added committed `docs/` GitHub wiki source, a PR-safe validator/publish workflow using `GITHUB_TOKEN`, local docs validation, and consumer documentation for SDK API layers, hot paths, performance-sensitive options, recommendations, and anti-patterns.
2727
- `SOW-0099-20260608-rust-crates-io-publication.md` - completed. Rust SDK packages were published to crates.io at `0.6.0` under `systemd-journal-sdk` plus project-prefixed internal package names; release tags are created on the SOW close commit.
2828
- `SOW-0096-20260607-codacy-metrics-and-coverage-hygiene.md` - completed. Go and Rust coverage reports now remove test/test-harness paths before Codacy upload, the Rust/Go Codacy metrics audit is committed, GitHub code scanning has zero open alerts on final implementation commit `7e3d3e5d`, Codacy reports `issuesCount = 0`, coverage `73%`, complexity `46%`, and duplication `30%`; remaining production metric debt is tracked by SOW-0097 and SOW-0098.
2929
- `SOW-0084-20260602-code-scanning-and-codacy-gate.md` - completed after regression repair. GitHub CodeQL alert `3341` is closed on head `1d7006ae`; GitHub code scanning has zero open alerts; Codacy Cloud reports `issuesCount = 0` and `codacy issues` returns zero issues on the same head.

0 commit comments

Comments
 (0)