docs: complete the Build with AI documentation (hub, spokes, and task pages) - #10367
docs: complete the Build with AI documentation (hub, spokes, and task pages)#10367yjouffrault wants to merge 10 commits into
Conversation
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Moves build-with-ai.mdx to build-with-ai/index.mdx and rewrites the hub content. Adds setup.mdx and working-with-ai.mdx as stubs, and registers the new category in the sidebar. Working baseline for iteration. The two spokes are placeholders. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fix two broken #install anchors that made the docs build fail: the hub never had an Install heading, and installation now lives on the setup page. Repoint import-from-csv and analyze-your-data at setup.mdx. Rework the hub against a prose audit of all 67 of its sentences. Open on capability and reader situation rather than a work breakdown; give the eleven skill-as-subject sentences their verbs back to the reader or the assistant; drop three absence-framed section openers; state the AI-first path as the recommendation rather than leaving it inferable; add the "In this section" catalog every other hub ends with. Correct three MCP claims against infrahub-mcp source: read_only both hides write tools and blocks GraphQL mutations, branch_pattern is a configurable default, and auth_mode defaults to none. Cover all 13 skills in the repo, not the eleven the plan recorded. Diagnostics Analyzer is named without a link because its reference page does not exist yet. Write setup.mdx as dependency-ordered numbered steps, and working-with-ai.mdx as direct-versus-planned, what is checked for you against what only you can judge, and one change end to end. The prompts table is deliberately left out; there is no source for it. Wire the sidebar entry as a category with a clickable hub so both spokes are reachable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Apply the plan's per-page change lists now that these pages ship in the same PR as the hub that sets their conventions. All three: drop the duplicate H1 that repeated the frontmatter title. Build your schema: retitle to "Build your schema with AI", since it sits beside "Create and load schema" in the sidebar and the two are otherwise easy to confuse. Stop opening on the raw skill ID as the sentence subject, and give the skill's four verbs to the assistant. Cut the "an assistant can invent an attribute" paragraph, which now lives once on the hub, and point at the hub's review section instead. Say what Build your first schema contains rather than only linking it. Import data from CSV: keep the source-fallback table, cut the paragraph below it that argued for it. Give the skill's verbs to the assistant. Fix the link label to match the real page title, "Load data using YAML file". Keep the partial-load warning. Analyze your data: open for a reader who is not the engineer who built the model, and move the MCP tool names below the questions they answer. Remove the contradiction between "no manual equivalent" and the later section routing compliance rules to checks. Note that a read-only MCP deployment is enough for this reader. Sidebar: resolve the duplicate objects/load-from-yaml entry, and add import-from-csv beside it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
3 issues found across 8 files
Confidence score: 4/5
- In
docs/docs/overview/build-with-ai/setup.mdx, the primarynpx skills addpath may install outside the expected project-localskills/infrahub-common/location, leaving readers with a setup that does not work as documented; specify the CLI scope and show how to verify the install location. - In
docs/docs/objects/import-from-csv.mdx, the preflight guidance may imply that references to live-only objects can be resolved from local schemas, which could give users false confidence in validation; qualify the claim and state the limitation clearly. - In the worked example in
docs/docs/objects/import-from-csv.mdx, the fabricated timestamp and placeholder SHA-256 appear to be real provenance, making the output non-reproducible or unverifiable; label them as illustrative placeholders or provide genuine generated values.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/docs/overview/build-with-ai/setup.mdx">
<violation number="1" location="docs/docs/overview/build-with-ai/setup.mdx:41">
P2: When readers use the primary `npx skills add` command, the subsequent project-local `skills/infrahub-common/` requirement may not be satisfied because the page does not specify the CLI scope or verify where it installs. Document the command's project-local option explicitly, or add a verification step that confirms the shared skill directory exists before continuing.</violation>
</file>
<file name="docs/docs/objects/import-from-csv.mdx">
<violation number="1" location="docs/docs/objects/import-from-csv.mdx:27">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**
When only local schemas are available, the preflight can verify emitted-file closure but cannot resolve references to live-only objects. Qualify this claim and state that unresolved live references still require server-side validation.</violation>
<violation number="2" location="docs/docs/objects/import-from-csv.mdx:45">
P3: The worked example presents a fabricated timestamp and placeholder SHA-256 as generated provenance, so readers cannot reproduce or verify the shown output. Use clearly marked illustrative placeholders (or provide the source file and reproducible values) and link the partial-load recovery step to the branch-discard documentation.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
| The installer copies the skills into your project, so run it from the repository where your Infrahub schema, object files, and Python components are kept. | ||
|
|
||
| ```bash | ||
| npx skills add opsmill/infrahub-skills |
There was a problem hiding this comment.
P2: When readers use the primary npx skills add command, the subsequent project-local skills/infrahub-common/ requirement may not be satisfied because the page does not specify the CLI scope or verify where it installs. Document the command's project-local option explicitly, or add a verification step that confirms the shared skill directory exists before continuing.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/overview/build-with-ai/setup.mdx, line 41:
<comment>When readers use the primary `npx skills add` command, the subsequent project-local `skills/infrahub-common/` requirement may not be satisfied because the page does not specify the CLI scope or verify where it installs. Document the command's project-local option explicitly, or add a verification step that confirms the shared skill directory exists before continuing.</comment>
<file context>
@@ -0,0 +1,118 @@
+The installer copies the skills into your project, so run it from the repository where your Infrahub schema, object files, and Python components are kept.
+
+```bash
+npx skills add opsmill/infrahub-skills
+```
+
</file context>
|
|
||
| The rows are translated into the same object YAML format documented on [Load data using YAML file](./load-from-yaml). | ||
|
|
||
| Your assistant then checks its own output against the object-file rules and confirms every relationship reference resolves, before it contacts a server. Only once that passes does it create a fresh branch, run `infrahubctl object validate` against it to catch schema-resolution errors, and then `infrahubctl object load` to put the objects on the branch. Your assistant hands that branch back to you and never merges it. |
There was a problem hiding this comment.
P2: Custom agent: Flag AI Slop and Fabricated Changes
When only local schemas are available, the preflight can verify emitted-file closure but cannot resolve references to live-only objects. Qualify this claim and state that unresolved live references still require server-side validation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/objects/import-from-csv.mdx, line 27:
<comment>When only local schemas are available, the preflight can verify emitted-file closure but cannot resolve references to live-only objects. Qualify this claim and state that unresolved live references still require server-side validation.</comment>
<file context>
@@ -0,0 +1,80 @@
+
+The rows are translated into the same object YAML format documented on [Load data using YAML file](./load-from-yaml).
+
+Your assistant then checks its own output against the object-file rules and confirms every relationship reference resolves, before it contacts a server. Only once that passes does it create a fresh branch, run `infrahubctl object validate` against it to catch schema-resolution errors, and then `infrahubctl object load` to put the objects on the branch. Your assistant hands that branch back to you and never merges it.
+
+Where a column maps to nothing in your schema, your assistant stops and asks rather than guessing.
</file context>
|
|
||
| ```yaml title="objects/001-devices.yml" | ||
| # Generated from inventory.csv | ||
| # sha256: 3f2a9c1e... generated: 2026-08-13T10:04:00Z |
There was a problem hiding this comment.
P3: The worked example presents a fabricated timestamp and placeholder SHA-256 as generated provenance, so readers cannot reproduce or verify the shown output. Use clearly marked illustrative placeholders (or provide the source file and reproducible values) and link the partial-load recovery step to the branch-discard documentation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/objects/import-from-csv.mdx, line 45:
<comment>The worked example presents a fabricated timestamp and placeholder SHA-256 as generated provenance, so readers cannot reproduce or verify the shown output. Use clearly marked illustrative placeholders (or provide the source file and reproducible values) and link the partial-load recovery step to the branch-discard documentation.</comment>
<file context>
@@ -0,0 +1,80 @@
+
+```yaml title="objects/001-devices.yml"
+# Generated from inventory.csv
+# sha256: 3f2a9c1e... generated: 2026-08-13T10:04:00Z
+---
+apiVersion: infrahub.app/v1
</file context>
Completes the Build with AI documentation: the hub is reworked against a prose audit, the two spoke pages that were placeholders are written, and the three task pages are reworked. Follows the agreed structure in Build with AI — plan and content (INFP-678), §8–§13.
Six pages, all new to
stable. PR #10164 is replaced by this, not extended.The branch did not build before this
npm run buildfailed on two broken anchors, so CI could not have passed:The hub never had an
Installheading — the section was called "Get started". Both links now point atbuild-with-ai/setup.mdx, which is where installation actually lives after this change.onBrokenAnchorsisthrowindocusaurus.config.ts.The branch has also been rebased onto current
origin/stable; it was 893 commits behind, so CI would have run against a stale base.Worth a reviewer's attention
Three MCP facts were wrong or overstated. Checked against
opsmill/infrahub-mcpsource rather than the messaging brief:src/infrahub_mcp/config.pysaysread_onlyhides the write tools and blocks GraphQL mutations — the old wording overstated one half and omitted the otherbranch_patterndefaults tomcp/session-{date}-{hex}and is configurableauth_modedefaults tonone, meaning shared credentials. Both new pages say so, because it is the state a reader who configures nothing ends up inThe skill count was stale. The plan recorded eleven skills; the repo has 13. Two appeared nowhere in the main docs: Diagnostics Analyzer and Skill Gap Reporter. All 13 are now covered on the hub.
Diagnostics Analyzer has no reference page to link to.
/skills/skills-reference/analyzing-diagnosticsreturns 404, as do the plausible variants; every other skill named on the hub resolves. It is named and described without a link. The skills site needs that page — worth its own issue.The skills site contradicts itself on the count, saying "11 skills" then listing 12 at
/skills/installation-setup. Not fixable from this repo; flagging it.All three task pages had a duplicate H1 repeating the frontmatter title, which renders the title twice.
The hub rewrite
Driven by an audit of all 67 of its prose sentences, kept locally at
dev/specs/docs/build-with-ai-hub-audit.md:Where to startrow bundled three unrelated jobs under one Documentation cell; split in two.## In this sectioncatalog every other hub ends with.Preserved deliberately: the Skills-vs-MCP comparison table, the two concrete review examples, the one-off-analysis-to-check hand-off, and the neutral treatment of the manual path.
The two new pages
Set up your AI assistant — numbered steps, because setup is run-once and dependency-ordered. Opens with a four-row comparison of what to install, which asks a different question from the hub's two-tool table (what you install against what each tool is) so the two do not compete. Step 4 is a check whose answer distinguishes "skills present, MCP absent" from "both live". Ends with the LLM-and-no-tools path, which plan §1 asks to present as a legitimate choice.
Work with your assistant — direct-versus-planned with a size and complexity table, then what the skills verify against what only a person can judge, then one change walked from prompt to merged Proposed Change. It deliberately does not restate the hub's rule about branch and review: the hub states the rule, this page walks one instance of it.
The three task pages
They ship as new files here, so leaving them unreworked would have meant a hub that sets conventions landing beside three pages that break them.
infrahub-managing-schemasreturns…); that and four more skill-as-actor verbs now belong to the assistant. Cut the "an assistant can invent an attribute" paragraph, which now lives once on the hub.Also settled
Infrahub SkillsagainstInfrahub skills, was unsettled and these pages establish the term. Capitalised, as the product name — the docs already ran 8 to 1 that way.objects/load-from-yamlsidebar entry (plan §14 phase 3) surfaced as a rebase conflict and is resolved here rather than deferred.Deliberately left out
Checks
npm run buildindocs/passes on the rebased base; it failed before this changemarkdownlint-cli2on all six changed pages: 0 errorsswap,simple-easy,branded-terms-case-swap,eg-ie), which caught aJinja2 transformationlink label that should match the page's real title,Write a Jinja2 Transformation. A Vale pass in CI is still worth watching.