|
| 1 | +# docs-drift configuration for opentdf/platform. |
| 2 | +# |
| 3 | +# This file is consumed by the docs-drift skill |
| 4 | +# (https://github.com/virtru-corp/agent-skills/tree/main/skills/developers/docs-drift) |
| 5 | +# when a contributor runs `/docs-drift` after editing SDK code. The skill scans |
| 6 | +# for new/changed exported Go symbols and proto RPCs, drafts MDX stubs for |
| 7 | +# opentdf/docs, and prepares a PR. |
| 8 | +# |
| 9 | +# Most of the values below mirror the skill's built-in OpenTDF defaults — they're |
| 10 | +# committed as a documentation artifact so the contract is discoverable in this |
| 11 | +# repo. The `mappings:` section below them adds repo-specific routing the skill |
| 12 | +# wouldn't otherwise know about. |
| 13 | + |
| 14 | +docs: |
| 15 | + repo: ../docs # Sibling clone of opentdf/docs |
| 16 | + root: docs/sdks # Docs root within opentdf/docs |
| 17 | + |
| 18 | +version: |
| 19 | + tag_prefix: "sdk/" # SDK is independently versioned (sdk/v0.X.Y) |
| 20 | + |
| 21 | +scan: |
| 22 | + go_paths: # Where the scanner looks for Go source |
| 23 | + - sdk/ # the public SDK package |
| 24 | + - protocol/go/internal/ # source-file codegen helpers (PR #3232 pattern) |
| 25 | + proto_paths: # Where the scanner looks for .proto files |
| 26 | + - service/ |
| 27 | + exclude_paths: # Substring match — these are generated or test-only |
| 28 | + - sdk/sdkconnect/ # auto-generated Connect-RPC wrappers |
| 29 | + - sdk/gen/ # generated proto code (legacy path) |
| 30 | + - sdk/internal/ # Go internal package |
| 31 | + |
| 32 | +# Mappings route new symbols to the right MDX file when the name-only sniff |
| 33 | +# can't find an existing reference. Keys are glob patterns matched against |
| 34 | +# the fully-qualified symbol name; values are doc paths (relative to the |
| 35 | +# docs repo root) with an optional #section anchor for the heading to |
| 36 | +# append under. |
| 37 | +# |
| 38 | +# First-match-wins, ordered by insertion. Put the most specific patterns |
| 39 | +# first; the catch-all patterns last. |
| 40 | +mappings: |
| 41 | + |
| 42 | + # ── EntityIdentifier constructor helpers (PR #3232 pattern) ────────────── |
| 43 | + # Live in protocol/go/internal/authorization/v2/ and get codegen-copied |
| 44 | + # into protocol/go/authorization/v2/*.gen.go. They're documented in |
| 45 | + # authorization.mdx under the ## EntityIdentifier section. |
| 46 | + "ForToken": docs/sdks/authorization.mdx#entityidentifier |
| 47 | + "ForClientID": docs/sdks/authorization.mdx#entityidentifier |
| 48 | + "ForEmail": docs/sdks/authorization.mdx#entityidentifier |
| 49 | + "ForUserName": docs/sdks/authorization.mdx#entityidentifier |
| 50 | + "ForRegisteredResource": docs/sdks/authorization.mdx#entityidentifier |
| 51 | + "WithRequestToken": docs/sdks/authorization.mdx#entityidentifier |
| 52 | + |
| 53 | + # ── SDK discovery / attribute checks ───────────────────────────────────── |
| 54 | + # Methods on the SDK struct that read platform state without writing. |
| 55 | + # All land in discovery.mdx alongside ListAttributes / AttributeExists / etc. |
| 56 | + "SDK.List*": docs/sdks/discovery.mdx |
| 57 | + "SDK.Attribute*": docs/sdks/discovery.mdx |
| 58 | + "SDK.Validate*": docs/sdks/discovery.mdx |
| 59 | + "SDK.GetEntityAttributes": docs/sdks/discovery.mdx |
| 60 | + |
| 61 | + # ── TDF mechanics and re-wrap helpers ──────────────────────────────────── |
| 62 | + # Package-level functions for TDF inspection and option building. |
| 63 | + # CreateTDF, LoadTDF, and IsValidTdf already live in tdf.mdx; new |
| 64 | + # adjacent helpers (e.g., WithPolicyFrom from DSPX-2603) belong there too. |
| 65 | + "IsTDF": docs/sdks/tdf.mdx |
| 66 | + "IsValidTdf": docs/sdks/tdf.mdx |
| 67 | + "WithPolicyFrom": docs/sdks/tdf.mdx |
| 68 | + "BulkDecrypt": docs/sdks/tdf.mdx |
| 69 | + |
| 70 | + # ── Platform-client setup options ──────────────────────────────────────── |
| 71 | + # The "Initializing the SDK client" section of platform-client.mdx is |
| 72 | + # where setup-time options like WithPlatformEndpoint live. Newly-added |
| 73 | + # With*-style construction options default here unless overridden above. |
| 74 | + "With*": docs/sdks/platform-client.mdx#initializing-the-sdk-client |
| 75 | + |
| 76 | + # ── Policy enum aliases (PR #3408 pattern) ─────────────────────────────── |
| 77 | + # Constants like policy.OperatorIn / policy.BooleanAnd added in |
| 78 | + # protocol/go/internal/policy/enums.go. Documented under the enum tables |
| 79 | + # in policy.mdx. |
| 80 | + "Operator*": docs/sdks/policy.mdx |
| 81 | + "Boolean*": docs/sdks/policy.mdx |
| 82 | + "Rule*": docs/sdks/policy.mdx |
| 83 | + "State*": docs/sdks/policy.mdx |
| 84 | + |
| 85 | + # ── Proto service RPCs ─────────────────────────────────────────────────── |
| 86 | + # Per-service mapping. Each service's RPCs map to its dedicated MDX. |
| 87 | + "AuthorizationService.*": docs/sdks/authorization.mdx |
| 88 | + "AttributesService.*": docs/sdks/policy.mdx |
| 89 | + "ActionsService.*": docs/sdks/policy.mdx |
| 90 | + "NamespaceService.*": docs/sdks/policy.mdx |
| 91 | + "SubjectMappingService.*": docs/sdks/policy.mdx |
| 92 | + "ResourceMappingService.*": docs/sdks/policy.mdx |
| 93 | + "RegisteredResourcesService.*": docs/sdks/policy.mdx |
| 94 | + "ObligationsService.*": docs/sdks/obligations.mdx |
| 95 | + "KeyAccessServerRegistryService.*": docs/sdks/policy.mdx |
| 96 | + "KeyManagementService.*": docs/sdks/policy.mdx |
| 97 | + "UnsafeService.*": docs/sdks/policy.mdx |
| 98 | + "EntityResolutionService.*": docs/sdks/authorization.mdx |
| 99 | + "AccessService.*": docs/sdks/tdf.mdx |
| 100 | + "WellKnownService.*": docs/sdks/platform-client.mdx |
0 commit comments