When using knowctl to get documentation for libraries like ironrdp, the docs may describe an API that doesn't match the version the user is actually using. In this case:
- The knowctl topic likely had docs for ironrdp 0.5.x
- The latest version is 0.14.0 (a major API rewrite)
- Code written based on knowctl docs failed to compile with current crate versions
This is a general problem: library APIs change, but knowctl topics are static snapshots.
- No version awareness: Topics don't track which version they document
- No expiration/freshness signals: No indication of how old the docs are
- No integration with package managers: Can't cross-reference Cargo.toml, package.json, etc.
Add a version field to topic configuration:
topic: ironrdp
version: "0.14.0"
source_date: "2025-01-15"
docs:
- ...Benefits:
- Agents can warn when docs might be outdated
- Clear signal about what version is documented
- Can trigger re-fetching when version differs significantly
Drawbacks:
- Requires manual maintenance
- Semver interpretation is complex (patch vs minor vs major)
Support multiple versions with migration guides:
topic: ironrdp
versions:
- range: ">=0.14.0"
docs: [...]
- range: ">=0.5.0 <0.14.0"
docs: [...]
migration_to_0.14: "migration-guide.md"Benefits:
- Explicit support for version transitions
- Migration paths for breaking changes
Drawbacks:
- High maintenance burden
- Topic size grows significantly
Add metadata about documentation freshness:
topic: ironrdp
last_verified: "2025-01-01"
freshness: stale # fresh | stale | deprecated
api_stability: unstable # stable | unstable | experimentalAn agent can then:
- Warn: "These docs are from January 2025 and the library is marked unstable"
- Suggest: "Consider using web search for the latest API"
When an agent uses knowctl for a Rust crate:
- Check if Cargo.toml exists in the project
- Parse the dependency version for that crate
- Compare with topic's documented version
- Warn or adjust behavior accordingly
Implementation:
# In knowctl
def check_version_match(topic: str, project_dir: Path) -> VersionMatch:
topic_version = load_topic_version(topic)
if cargo_toml := find_cargo_toml(project_dir):
project_version = parse_dependency_version(cargo_toml, topic)
if not semver_compatible(topic_version, project_version):
return VersionMatch.MISMATCH
return VersionMatch.OKCombine several strategies:
-
Required metadata: Every topic must have:
version: What version the docs coverlast_updated: When docs were last refreshedsource_url: Where to find canonical docs
-
Freshness check command:
knowctl check-freshness ironrdp # Output: ironrdp docs are for v0.5.0, latest is v0.14.0 (stale) -
Agent guidance in docs: Add a standard header to all topic docs:
<!-- knowctl: version=0.5.0, check-latest-at=https://docs.rs/ironrdp --> -
Warning system: When topic is accessed, check if:
- Docs are older than 6 months
- Major version mismatch detected
- Topic marked as "unstable API"
- Add
versionandlast_updatedto topic schema - Update existing topics with version info
- Add
knowctl show-topic-info <topic>command
- Add
knowctl check-freshness <topic>command - Optionally query crates.io/npm for latest versions
- Return structured data agents can act on
- Auto-detect project dependencies
- Cross-reference with topic versions
- Surface warnings proactively
Given the current situation:
- Update the ironrdp topic to reflect 0.14.0 API
- Add version metadata to the topic
- Consider removing unstable topics - if a library has frequent breaking changes, maybe don't include it in knowctl (prefer web search for latest docs)
- Mark experimental libraries - add
stability: experimentalflag
For libraries like ironrdp that:
- Are pre-1.0 with frequent breaking changes
- Have rapidly evolving APIs
- Have good official documentation
It may be better to:
- Remove them from knowctl entirely
- Add a "pointer" topic that just says "use docs.rs/ironrdp for latest"
- Let agents use
scrapectlorsearchctlfor current docs
This acknowledges that some libraries are too unstable for static documentation snapshots.
The core issue is that knowctl topics are static snapshots in a dynamic ecosystem. The recommended fix is:
- Add version metadata to all topics
- Build freshness checking into knowctl
- Give agents tools to detect version mismatches
- Consider excluding highly unstable pre-1.0 libraries
For the ironrdp case specifically: either update the topic to 0.14.0 or remove it entirely and direct agents to use docs.rs/ironrdp directly via scrapectl.