Skip to content

feat(tutorials): showcase the tutorial components and document how to write tutorials - #212

Open
ccf-factory[bot] wants to merge 4 commits into
factory/stack/wi_2fa6b8bf808100304f9a/2from
factory/stack/wi_2fa6b8bf808100304f9a/3
Open

ccf-factory[bot] wants to merge 4 commits into
factory/stack/wi_2fa6b8bf808100304f9a/2from
factory/stack/wi_2fa6b8bf808100304f9a/3

Conversation

@ccf-factory

@ccf-factory ccf-factory Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8b4a1ca7-beb5-4aeb-bea8-7b627d31c60f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ccf-factory

ccf-factory Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

🏭 Tracked by CCF Factory — view

@ccf-factory-reviewer ccf-factory-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: APPROVE

no findings.

Stack (base-chain): #209 → #210 → #211 → #212

@ccf-factory-reviewer ccf-factory-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: COMMENT

1 Should-fix.

Stack (base-chain): #210 → #211 → #212

Non-blocking

  • [Should-fix] docs/tutorials/components.mdx:14 language advertises sh highlighting, but sh renders unhighlighted: The site highlights code with the Prism bundled in prism-react-renderer (verified in node_modules at the PR head: the bundled language set has yaml, yml, json, js, javascript, ... but neither sh nor bash), and docusaurus.config.ts sets no themeConfig.prism.additionalLanguages. A <CopyBlock language="sh"> therefore renders as plain text - the PR #210 body itself lists adding bash as an open question and notes the site's 34 existing sh fences render plain today. The page (and CopyBlock.tsx's docstring) present sh to authors as a working highlighting choice; the usage fences' mdx tag has no grammar either. Authors will write language="sh" expecting colour and get none, and the showcase misrepresents its own component. Fix: Either add themeConfig.prism.additionalLanguages: ['bash', 'mdx'] (the open question from #210 - it changes every code block site-wide, so its own call) or say on the page which languages actually highlight today (yaml, json, js, ... ) and that sh renders plain until shell grammars are added. (d307effaa65d)

Stack summary (whole stack, top PR's review)

Epic #204, infrastructure only (tutorial content is later work). #209 (merged) added the Tutorials navbar tab, tutorialsSidebar and docs/tutorials/index.md. #210 adds the copy-pastable code blocks: <CopyBlock> (on @theme/CodeBlock, title row, always-visible copy, snippetText dedent) and <CodeGroup> (per-file tabs, shared keyboard helper codeGroupTabs.mjs), registered site-wide through a new @theme-original/MDXComponents wrapper - the supported route, since markdown.mdxPageImports does not exist in Docusaurus 3.9.2. #211 builds the rest of the Mintlify-style set on top - Tabs/Tab, Card/CardGroup (internal href via Docusaurus Link, otherwise new tab + rel="noopener noreferrer"), Steps/Step, Callout + the five admonition shortcuts, Accordion/AccordionGroup (native details) - with the titledChildren and cardLink helpers under node --test. #212 (this PR) makes the set reviewable and reusable: the showcase page docs/tutorials/components.mdx (every component live, with its usage snippet), the sidebar entry, and the authoring guidance in STYLE.md (new Tutorials page skeleton) and CONTRIBUTING.md (Writing tutorials). Merge order: #210 → #211 → #212; each is based on the one below, so review each at its head and merge bottom-up once all are approved and green. #210 currently has Must-fix findings (fabricated CLI commands/config shape in test fixtures); the STYLE.md contract with ccf-skills is with a human.

Checks

  • build: the PR's build check is SUCCESS on the head reviewed; at the stack head yarn install, yarn test (62 pass), yarn typecheck, yarn spellcheck (0 issues) and yarn build also pass locally, and tests/typecheck/spellcheck pass at this PR's head too.
  • i18n: i18n.locales is ['en'] only and no i18n/ tree exists, so the only locale is the one built; nothing half-translated; DOCS-TRANS-001 not applicable.
  • versioning: instances.yaml is untouched by the stack (and validates during the build); no *_versions.json or *_versioned_docs file changes, so no released line is touched and no minor line is duplicated.
  • style: docs-style checklist run against STYLE.md on the changed pages.
  • source verification (DOCS-ACC-001): every setting, CLI command/flag, config field and path the diff adds was checked against the source repo it documents (instances.yaml) with gh api ...?ref=<branch>; no docs page or memory was trusted.

@gusfcarvalho

Copy link
Copy Markdown
Contributor

No need to include a ccf-skills PR.

1 similar comment
@gusfcarvalho

Copy link
Copy Markdown
Contributor

No need to include a ccf-skills PR.

@ccf-factory-reviewer ccf-factory-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: APPROVE

1 Should-fix.

Stack (base-chain): #210 → #211 → #212

Non-blocking

  • [Should-fix] docs/tutorials/components.mdx:14 The page offers sh as a highlighting language, but the site cannot highlight it: The page tells authors language picks the highlighting (sh, yaml, json, ...). Checked against this repo's own config and bundle, not another page: docusaurus.config.ts's themeConfig.prism sets only theme/darkTheme, with no additionalLanguages, and the bundled prism-react-renderer registers neither sh nor bash (Prism.languages has yaml, yml, json, js, javascript, tsx, ... but no shell), so a sh snippet falls back to plain text. Confirmed in the built page at this head: build/tutorials/components.html renders the CopyBlock as class="prism-code language-sh" with every token a token plain, and the page's own mdx usage fences are plain too. `STYLE.md:22` asks for the `sh` tag, so the page is repeating the repo's own convention rather than inventing one, and every existing sh block on the site (for example api/cli-reference.md) is already unhighlighted: the gap is the site's Prism set, not this page. It is a Should-fix and a follow-up, not a must-fix here: neither sh nor bash is in prism-react-renderer's bundle, so fixing it means adding Prism language modules in docusaurus.config.ts, a change unrelated to this PR's intent. Fix: Either fix the site's Prism set in a follow-up (add the shell languages to themeConfig.prism.additionalLanguages, importing the Prism definitions since prism-react-renderer does not bundle bash), or narrow the sentence on this page to the languages that highlight today and say plainly that command blocks are shown unstyled until the site gains a shell grammar. (b4ae4d9f1eb5)

Checks and verification (round 2)

Nothing moved since round 1 (head still e9d7317). Re-run at the stack head in the review workspace: yarn build SUCCESS (the only warning pre-existing, vscode-languageserver-types via redoc), yarn test 62 pass / 0 fail, yarn typecheck and yarn spellcheck clean; the PR's build check is SUCCESS at this head too.

  • versioning: instances.yaml, every *_versioned_docs/ and *_versions.json is untouched by all three PRs; prebuild's gen-sidebars.mjs revalidated the manifest at this head (26 instances, 25 generated, 1 curated), so released lines stay as released and no instance was added by hand.
  • i18n: i18n.locales is ['en'] and there is no i18n/ directory, so DOCS-TRANS-001 is not engaged; nothing is half-translated and no theme string needs write-translations.
  • style: the docs-style checklist over the three changed pages (docs/tutorials/components.mdx, the new STYLE.md section, the new CONTRIBUTING.md section): sentence-case headings, US spelling (cspell clean), commands/paths/values in code, every fenced block tagged, no filler or future promises, "Continuous Compliance Framework (CCF)" on first mention, links as relative .md paths (./index.md), no link to current from a released line.
  • accuracy: every factual claim on the new page was checked against the source it describes, not against another page. Both Card routes exist in the build (build/tutorials.html, build/introduction.html, trailingSlash: false); onBrokenLinks: 'throw' and onBrokenMarkdownLinks: 'throw' are what the page says they are; a wrong sidebar id does fail the build; the copy button the page promises is in the client bundle (build/assets/js/6556.*.js carries "Copy code to clipboard"), so the always-visible-copy-button CSS does reach a real element. The one claim the site does not support is the sh language above.
  • CLI, config and field-list claims elsewhere in the stack were checked against compliance-framework/api at its default branch with gh api …?ref=main (cmd/root.go, pkg/agentconfig/types.go) — see #210.

Stack summary (this work item)

Epic docs#204 asked for a Tutorials tab plus rich, Mintlify-style MDX; tutorial content is later work, so this stack is infrastructure only, one PR per sub-issue, merged bottom-up:

  1. #209 (merged, 815b1e0) — the tab: docs/tutorials/index.md, tutorialsSidebar, the navbar docSidebar item.
  2. #210 (.../1, 31d2176) — the copy-pastable primitives CopyBlock and CodeGroup, their plain-ESM helpers (snippetText, codeGroupTabs) under node --test, the two CSS rules, and the MDX scope swizzle. REQUEST_CHANGES: three Must-fix threads from round 1 are still open (below).
  3. #211 (.../2, 89e51d5) — Tabs/Tab, Card/CardGroup, Steps/Step, Callout + the five named callouts, Accordion/AccordionGroup, with titledChildren and cardLink tested. APPROVE, two non-blocking items.
  4. #212 (.../3, e9d7317, this PR) — the showcase page, the STYLE.md Tutorials page skeleton and the CONTRIBUTING.md "Writing tutorials" section, which is what makes the components reusable and reviewable. APPROVE, one non-blocking item.

Runtime: all additive — new MDX scope entries, one page, two src/ folders, CSS, sidebar id, docs text. Nothing else in the org consumes it.

Notes

  • The docs-instances contract to ccf-skills (round 1 held this as a Question; round 2 closes it as a note). ccfr feature flags STYLE.md as a contract whose consumer is ccf-skills with no consumer PR. Read against the consumer's own text rather than assumed: the docs-style skill says STYLE.md is the source of truth and "when the two disagree, STYLE.md in the checkout wins, and the checklist needs an update in this repo", and its step 2 already falls back to "general page" for a type it does not know. The new Tutorials page skeleton therefore breaks nothing in the skill, so no companion PR is required for this stack to merge; refreshing that checklist (and the skill's list of page types) is a worthwhile follow-up in ccf-skills. (compliance-framework/ccf-skills is not readable with this task's credentials, so this rests on the shipped skill text, quoted above — a maintainer who wants the checklist updated in the same train should say so.)
  • The three Must-fix findings live on #210, the bottom of the stack; they gate the merge of all three.

@ccf-factory
ccf-factory Bot force-pushed the factory/stack/wi_2fa6b8bf808100304f9a/3 branch from e9d7317 to e797e74 Compare November 28, 2026 12:48
@ccf-factory
ccf-factory Bot force-pushed the factory/stack/wi_2fa6b8bf808100304f9a/2 branch from 89e51d5 to 3830c83 Compare November 28, 2026 12:48

@ccf-factory-reviewer ccf-factory-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: APPROVE

1 Should-fix.

Stack (base-chain): #210 → #211 → #212

Non-blocking

  • [Should-fix] docs/tutorials/components.mdx:14 The page advertises sh highlighting the site cannot do: The page tells authors language picks the highlighting (sh, yaml, json, ...). Checked against this repo's own config and bundle, not another page: docusaurus.config.ts themeConfig.prism sets only theme/darkTheme with no additionalLanguages, and the bundled prism-react-renderer (2.4.1) registers neither sh nor bash - Prism.languages at this head has yaml, json, js, ts, markup, ... but no shell language - so a sh snippet falls back to plain text. Re-confirmed at this head in the review workspace. STYLE.md asks for the sh tag, so the page repeats the repo's own convention rather than inventing one, and the gap is the site's Prism set, not this page: fixing it means adding Prism language modules in docusaurus.config.ts, a change unrelated to this PR's intent. Reported in the previous round too; nothing changed here. Fix: Either fix the site's Prism set in a follow-up (add the shell language to themeConfig.prism.additionalLanguages, importing the Prism definitions since prism-react-renderer does not bundle bash), or narrow the sentence here to the languages that highlight today and say plainly that command blocks are shown unstyled until the site gains a shell grammar. (815b5c17dcd6)

Re-review at e797e74

Nothing moved in this PR: ccfr last-review reports no new commits and no changed files since the last review (the head's sha moved only because the stack was rebased onto the fixture fix in #210).

Checks and verification

  • build: the PR's build check is SUCCESS at this head; locally yarn test (62 pass / 0 fail), yarn typecheck and yarn spellcheck are clean, and yarn build at this head succeeds with only the pre-existing vscode-languageserver-types warning.
  • versioning: instances.yaml, every *_versioned_docs/ and *_versions.json is untouched by all three PRs. The new page is a general unversioned doc under docs/tutorials/, and sidebars.js only gains the tutorials/components id — no instance added by hand (DOCS-INST-001 clear), released lines untouched (DOCS-VER-001/002 not engaged).
  • i18n: i18n.locales is ['en'] alone and there is no i18n/ directory, so nothing is half-translated and no theme string needs write-translations (DOCS-TRANS-001 not engaged).
  • style: the docs-style checklist over the three changed pages (docs/tutorials/components.mdx, the new STYLE.md Tutorials page skeleton, the new CONTRIBUTING.md "Writing tutorials" section): reader named at the top ("This page is for docs authors"), sentence-case headings, US spelling (cspell clean), commands/paths/values in code, every fenced block tagged, no filler or future promises, "Continuous Compliance Framework (CCF)" on first mention, links as relative .md paths — ./index.md resolves, onBrokenLinks/onBrokenMarkdownLinks are throw (docusaurus.config.ts:124, :233) and the build passes — and no link from a released line to current.
  • accuracy: every factual claim on the new page was re-checked against the source it describes, not against another page: yarn build/yarn serve are real scripts; Card's routes exist in the build (build/tutorials.html, build/introduction.html, trailingSlash: false); a wrong sidebar id does fail the build (doc ids are paths under docs/ minus extension, as the page says); tutorialsSidebar is hand-curated while gen-sidebars.mjs writes the instance sidebars, as the CONTRIBUTING.md text says; the navbar label really is Tutorials (docusaurus.config.ts:180). The one claim the site does not support is the sh language above.

Stack summary (this work item)

Epic docs#204 asked for a Tutorials tab plus rich, Mintlify-style MDX; tutorial content is explicitly later work, so this stack is infrastructure only — one PR per sub-issue, merged bottom-up:

  1. #209 (merged, 815b1e0) — the tab: docs/tutorials/index.md, tutorialsSidebar, the navbar docSidebar item. Not open, not re-reviewed.
  2. #210 (.../1, 9d1ce79) — CopyBlock and CodeGroup with the tested plain-ESM helpers snippetText/codeGroupTabs. APPROVE: the three Must-fix DOCS-ACC-001 fixture findings were fixed at 9d1ce79 and re-verified against compliance-framework/api at its default branch (see that review); one a11y Nit reported there.
  3. #211 (.../2, 3830c83) — Tabs/Tab, Card/CardGroup, Steps/Step, Callout with the five named callouts, Accordion/AccordionGroup, with titledChildren/cardLink tested. APPROVE, two non-blocking items there.
  4. #212 (.../3, e797e74, this PR) — the showcase page, the STYLE.md Tutorials page skeleton and the CONTRIBUTING.md "Writing tutorials" section, which make the components reviewable and reusable. APPROVE, one non-blocking item (the site's sh Prism gap).

Runtime: all additive — new MDX scope entries, one page, two src/ folders, CSS, a sidebar id and docs text. Nothing else in the org consumes it.

Notes

  • The ccf-skills companion question is answered, not held. The earlier round asked whether the new STYLE.md Tutorials page skeleton needs a companion ccf-skills docs-style PR now (the docs-instances contract, gap: true). @gusfcarvalho answered on this PR ("No need to include a ccf-skills PR", 2026-11-28), which settles it: the docs-style skill treats STYLE.md as the source of truth ("when the two disagree, STYLE.md in the checkout wins"), so nothing breaks without a companion PR, and refreshing that checklist stays an optional follow-up in ccf-skills. Nothing in this stack is held for a human.

… write tutorials

Adds docs/tutorials/components.mdx, the one showcase page that renders every
code block and MDX component from the two preceding pull requests, each with a
usage snippet; registers it in tutorialsSidebar; adds the Tutorials page
skeleton to STYLE.md; and tells authors where tutorials live in CONTRIBUTING.md.
Name the product in full on first use of the showcase page, and make the
Card and Combine-them usage snippets byte-match the live demo they show.
The yarn test claim holds for the plain helpers, not every component file.
Render the five callout shorthands and the long-form Callout live, and make the
Callout usage fence byte-match its live demo.
@ccf-factory-reviewer
ccf-factory-reviewer Bot force-pushed the factory/stack/wi_2fa6b8bf808100304f9a/3 branch from e797e74 to d248b29 Compare November 28, 2026 13:19
@ccf-factory-reviewer
ccf-factory-reviewer Bot force-pushed the factory/stack/wi_2fa6b8bf808100304f9a/2 branch from 3830c83 to 2782f55 Compare November 28, 2026 13:19

@ccf-factory-reviewer ccf-factory-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: REQUEST_CHANGES

1 Must-fix.

Stack (base-chain): #211 → #212

Stack summary (top PR)

Open stack of the Tutorials epic (docs#204), bottom to top; #209 (Tutorials tab) and #210
(CopyBlock/CodeGroup) merged to main before this round.

  • #211 (MDX component set: Tabs/Tab, Card/CardGroup, Steps/Step,
    Callout + Note/Tip/Info/Warning/Danger, Accordion/AccordionGroup, tested helpers
    titledChildren.mjs/cardLink.mjs, CSS, MDX-scope registration): approve. No blocking
    finding; two Should-fixes are listed in that PR's review body (tab-row duplication with
    CodeGroup, CORE-DUP-001; Steps numbering hidden from assistive tech). Helpers pass node --test; components follow the repo's established pattern of testing the plain-ESM decisions,
    not the JSX.
  • #212 (this PR: components showcase, STYLE.md Tutorials page
    skeleton, CONTRIBUTING.md authoring section, sidebar entry): request changes - one
    Must-fix inline thread (DOCS-ACC-001, the sh highlighting claim).

Checks. build: GitHub's build check (CI runs yarn install && yarn test && yarn build)
passes at both heads, and a local production build passes at this stack head; #211's Spellcheck
check also passes (it does not trigger on this PR, whose base is #211's branch - yarn spellcheck was run locally here instead: 153 files, 0 issues; yarn test 62 pass, yarn typecheck clean). i18n: the only locale is en (docusaurus.config.ts), no i18n/ tree exists,
nothing is half-translated; DOCS-TRANS-001 not applicable. versioning: instances.yaml and every
released line (*_versioned_docs/, *_versions.json) are untouched by both PRs, and the
manifest still validates in the build. style: the docs-style checklist was run against
components.mdx, the STYLE.md addition and the CONTRIBUTING.md section; the remaining unmet item
is the accuracy claim in the thread below. Accuracy of every claim the diffs add was checked against the
source repo at the documented version (docusaurus.config.ts, package.json and the pinned
Prism/Infima bundles at main), not another docs page: the routes /tutorials and
/introduction, the tutorialsSidebar doc ids, the yarn build/serve/test commands, the
admonition kinds, the Infima variables used by #211, and onBrokenMarkdownLinks: 'throw' (which
makes this page's broken-links Warning true) all hold. Not verified: tab/accordion hydration in
a live browser (no interactive browser in this environment).

A Question about this PR is held for a human (never posted by the reviewer): whether the new
STYLE.md Tutorials page skeleton needs a companion ccf-skills docs-style checklist PR before
this PR merges, or later.


## CopyBlock

One snippet the reader copies in one click: a command, a config file or file contents, with a title row and a copy button that stays visible. Pass the snippet as the `code` prop, or as text children (a template literal that spans several lines); shared leading indentation is dropped, so it copies exactly what the reader sees. `language` picks the highlighting (`sh`, `yaml`, `json`, ...) and `title` labels the block.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Must-fix] DOCS-ACC-001 · Claim doesn't match the documented version

Line 14 tells authors that CopyBlock's language prop "picks the highlighting (sh, yaml, json, ...)" and the live demos and usage snippets use language="sh" throughout (lines 16-24, 33, 55-60, 131-138, 149-156). The source does not support sh: the site's highlighter is the Prism bundle pinned by yarn.lock (prism-react-renderer, 53 languages - no sh, bash or shell; yaml, json and js are present) and docusaurus.config.ts sets no themeConfig.prism.additionalLanguages (checked at main: only theme/darkTheme, lines 218-220). This round's production build of this very page confirms it: every language="sh" block SSRs with only token plain spans (no syntax colours) while language="js" tokenises correctly. The page's own demos render unhighlighted under the copy-paste guidance it gives. (The merged CopyBlock.tsx/CodeGroup.tsx comments carry the same 'such as sh, yaml or json' wording on main; fix them in the same follow-up.)

Why: Readers configure and operate CCF from these pages. A wrong default, flag, endpoint or permission sends an operator to a setting that does not exist or behaves differently at their version.
Fix: Either say what actually highlights - list languages from the shipped Prism set (yaml, json, js, ...) and drop sh from the examples - or make the claim true first: set themeConfig.prism.additionalLanguages: ['bash'] in docusaurus.config.ts (prismjs registers sh/shell as bash aliases, so sh then highlights site-wide, including the existing ```sh fences on the api/agent pages), keep the demos, and correct the same wording in CopyBlock.tsx and CodeGroup.tsx on main.

ccf-review · 08fe3964f3fb · rules@unknown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant