okf: dedupe default model, emit okf_version in root index#161
Open
MuhammadHasbiAshshiddieqy wants to merge 1 commit into
Open
Conversation
Three small correctness/consistency fixes in the reference_agent package: - Single-source the default Gemini model. bundle/index.py redefined "gemini-flash-latest" as its own _FALLBACK_MODEL, independent of agent.DEFAULT_MODEL. They were identical but could silently drift. DEFAULT_MODEL now lives in the dependency-free package __init__, which both agent.py and bundle/index.py import — avoiding the import cycle that arises if index.py imports it from agent.py. - Emit okf_version in the bundle-root index.md frontmatter (SPEC §11), the one index file permitted to carry frontmatter. Subdirectory indexes remain frontmatter-free. Adds a regression test. - Clarify that REQUIRED_FRONTMATTER_KEYS is the agent's quality bar, not OKF conformance (the SPEC requires only `type`); reword the prompt heading accordingly so the stricter check isn't mistaken for the spec. - Point the web fetcher User-Agent at the canonical repo URL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small correctness/consistency fixes in the
reference_agentpackage, plus a stale-URL fix.bundle/index.pyredefined"gemini-flash-latest"as its own_FALLBACK_MODEL, independent ofagent.DEFAULT_MODEL. They were identical but could silently drift if one was changed.DEFAULT_MODELnow lives in the dependency-free package__init__, which bothagent.pyandbundle/index.pyimport. (Importing it fromagent.pywould introduce a circular import:bundle/__init__ → index → agent → tools.bundle_tools → bundle; the leaf-module placement avoids that.)okf_version(SPEC §11). The bundle-rootindex.mdnow declaresokf_version: "0.1"in frontmatter — the one index file the spec permits to carry frontmatter. Subdirectory indexes stay frontmatter-free. Adds a regression test.REQUIRED_FRONTMATTER_KEYSenforces four keys, but the OKF spec requires onlytype(title/description/timestamp are recommended). Added a comment documenting that this is the agent's quality bar for generated docs — not a spec-conformance claim — and reworded the prompt heading so the stricter check isn't mistaken for the spec. No behavior change.Testing
pytest— 34 passed (was 33; +1 new test for theokf_versionbehavior).Notes
A separate, related consistency question — the SPEC §5.1 "recommended" absolute links vs. the agent prompt's "never start a link with
/" — is intentionally not addressed here, since it's a design tradeoff that warrants maintainer input. Happy to file an issue.🤖 Generated with Claude Code