Skip to content

chore(ai-tutors): regenerate lesson-08 knowledge base - #1050

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:chore/regen-lesson-08
Aug 17, 2026
Merged

chore(ai-tutors): regenerate lesson-08 knowledge base#1050
potiuk merged 1 commit into
apache:mainfrom
potiuk:chore/regen-lesson-08

Conversation

@potiuk

@potiuk potiuk commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md) — generated tutor prompt
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other: regenerated artefact — python3 ai-tutors/inject-knowledge-base.py output, no hand edits

Test plan

  • prek run passes on the changed file (markdownlint, lychee, typos, SPDX, doctoc)
  • python3 ai-tutors/inject-knowledge-base.py --check exits clean — before this change it listed lesson-08
  • For Python packages touched — none
  • For Groovy bridges touched — n/a
  • For skill changes — no skill changed
  • Other: confirmed the diff contains no code-fence changes, i.e. this is a content refresh rather than an artefact of the recent tag_bare_code_fences fix

RFC-AI-0004 compliance

  • HITL — any new mutation is gated on explicit user confirmation
  • Sandbox — no new unrestricted host access; network reach declared in the adapter
  • Vendor neutrality — placeholders used in all skill / tool prose
  • Conversational + correctable — agentic-override path documented if behaviour is adopter-tunable
  • Write-access discipline — no autonomous outbound messages; drafts only, sent on confirmation
  • Privacy LLM — private content does not reach a non-approved LLM; redactor invoked where needed

(None apply — regenerated documentation content.)

Linked issues

Refs #985 (the source-page change this propagates). Follow-up to #1010, which closed the related lesson-04 drift.

Notes for reviewers (optional)

The whole diff is generator output, so the useful review question is whether the generator should have been run, not whether the text is right. Two things worth knowing:

  1. Nothing enforces this. No CI job or prek hook runs inject-knowledge-base.py --check, so a source-page edit can silently leave a tutor prompt stale — which is exactly how this one drifted. Now that ai-tutors/ is a uv workspace member (added in fix(ai-tutors): stop nested code fences inverting the fence state #1011), a --check step would be cheap to wire in. Worth a follow-up issue rather than folding into this PR.
  2. chore(ai-tutors): regenerate knowledge base for lesson-04-your-first-skill #928 was closed as superseded rather than merged: it regenerated lesson-04 before two source-page changes landed, so merging it would have rolled that file backwards. This PR is the remaining half of the same cleanup.

`inject-knowledge-base.py --check` reported
`lesson-08-eval-driven-development.md` as out of date on `main`. The tutor
prompt embeds its source page verbatim, and that page moved on without the
prompt being rebuilt: apache#985 replaced worked example 2 with the real case-7
fixture — a `BashOperator` `KeyError` report carrying a `SYSTEM:` injection —
where the prompt still described a dark-mode feature request with a different
injection string. A tutor teaching prompt-injection defence from an example
that no longer exists in the fixtures is the wrong thing to hand a learner.

Pure `python3 ai-tutors/inject-knowledge-base.py` output; no hand edits.
Nothing in the diff is fence-related — this drift predates the nested-fence
work in apache#1010 / apache#1011 and is independent of it, which is why it was
deliberately left out of apache#1010 rather than bundled in.

`--check` is now clean across all eleven prompts.

Generated-by: Claude Code (Opus 5)

@choo121600 choo121600 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cool

@potiuk
potiuk merged commit 938c1ef into apache:main Aug 17, 2026
9 checks passed
potiuk pushed a commit that referenced this pull request Aug 17, 2026
#1080)

The AI-tutor prompts under `ai-tutors/` are generated from `docs/education/`
sources, but nothing enforced that they stayed in sync — a source page could
change and the tutor prompt drift quietly.

Add a local prek hook running `inject-knowledge-base.py --check`, which
prints the stale prompts and exits non-zero; the contributor reruns the
script without the flag to regenerate. `pass_filenames: false` because the
script always scans every lesson — the `files:` filter gates whether the
check fires, not what it inspects — and it always runs under
`prek run --all-files` in CI.

The hook immediately proved its worth: it caught
`ai-tutors/lesson-08-eval-driven-development.md` as stale, fixed separately
in #1050, which is merged first so this lands green.

Closes #1051
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.

2 participants