Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions okf/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ licensing (LGPL-2.1 + OCCT exception).
- Consumable via direct link, CMake `add_subdirectory` / imported target, or runtime
`dlopen` / `LoadLibrary`.
- A Pascal binding (`pascal/occt_templot.pas`) ships alongside the C header.

## Policies

- [Query `context` first for OCCT / OCCTSwift docs](policies/context-first.md)
- [Documentation updates are mandatory](policies/docs-current.md)
29 changes: 29 additions & 0 deletions okf/policies/context-first.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
type: policy
title: Documentation lookup — `context` first
description: Look docs up via context (ecosystem), context7 (external), then other repos' docs — never training-data recall.
tags: [policy, docs, context, context7, agents]
timestamp: 2026-06-27
---

# Documentation lookup — `context` first

When answering or writing code that touches **OCCT** or the **OCCTSwift** API, you **MUST** look the
documentation up rather than relying on training-data recall of OCCT/OCCTSwift signatures — it is
stale and wrong for this fast-moving stack.

**Lookup order:**

1. **`context` MCP** (`mcp__context__get_docs`) — the primary source for all ecosystem docs:
`occt` (the OpenCASCADE kernel, V8_0_0_p1 overview), `occtswift` (the Swift wrapper), this repo's
own package, and the other OCCTSwift-family packages indexed there.
2. **context7** — for **external** / third-party libraries that aren't in the local `context` cache.
3. **Docs in the other ecosystem repos** (their `okf/`, `docs/`, READMEs) — the fallback when a topic
isn't indexed in either.

The OCCT reference manual (per-class Doxygen API) is not indexed: read the bundled
`OCCT.xcframework/.../Headers/*.hxx`, or WebFetch `dev.opencascade.org/doc/refman/html/class_*.html`
for a specific class.

Ecosystem standard — see
[OKF-STANDARD.md](https://github.com/SecondMouseAU/ecosystem/blob/main/OKF-STANDARD.md).
21 changes: 21 additions & 0 deletions okf/policies/docs-current.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
type: policy
title: Documentation updates are mandatory
description: Docs must be updated with every release — or every PR for repos not yet on stable semver.
tags: [policy, docs, release, semver]
timestamp: 2026-06-27
---

# Documentation updates are mandatory

Documentation — the `context`-indexed docs, this repo's `okf/` bundle, and any public API reference —
must not drift from the code:

- **Repos on stable semver (≥ 1.0):** every **release** must ship the matching documentation update.
A release that changes public API or behaviour without updating the docs is incomplete.
- **Repos not yet on semver (0.x / pre-release / untagged):** every **PR** that changes public API or
behaviour must update the docs in the same PR.

This is the other half of the [`context-first`](context-first.md) contract: agents query the
`context` docs (`occt`, `occtswift`, this package) as the source of truth, so those docs must be
current — stale docs are worse than none.
Loading