code
Overview
Section titled “Overview”The code parent type covers software-related content including repositories, package registries, code snippets, gists, notebooks, and code documentation. It captures the metadata developers and agents need to evaluate, compare, and use software.
Subtypes
Section titled “Subtypes”| Subtype | Qualified Type | Description |
|---|---|---|
repository | code.repository | Source code repository (e.g., GitHub repo) |
package | code.package | Package registry listing (e.g., npm, PyPI) |
snippet | code.snippet | Code snippet or example |
gist | code.gist | Gist or short code share |
notebook | code.notebook | Jupyter or computational notebook |
documentation | code.documentation | Code-level documentation (e.g., JSDoc, Rustdoc) |
type_data fields
Section titled “type_data fields”| Field | Type | Required | Description |
|---|---|---|---|
repository | string | Yes | Repository or package name |
language | string | No | Primary programming language |
license | string | No | License identifier (SPDX format preferred) |
stars | integer | No | Star or favorite count |
forks | integer | No | Fork count |
dependencies | array<string> | No | Key dependencies |
package_manager | string | No | Package manager (npm, pip, cargo, etc.) |
Example type_data
Section titled “Example type_data”{"type_data": { "repository": "vercel/next.js", "language": "TypeScript", "license": "MIT", "stars": 128400, "forks": 27200, "dependencies": [ "react", "react-dom", "webpack", "turbopack", "swc" ], "package_manager": "npm"}}repositoryshould use theowner/repoformat for repositories, or the package name for package listings.languageis the primary language. Multi-language projects should list the dominant language here; secondary languages can be captured inentitiesorsections.licenseshould use SPDX identifiers where possible (e.g.,"MIT","Apache-2.0","GPL-3.0-only").starsandforksare point-in-time counts from when the page was fetched. Usesource.fetch_timestampto determine currency.dependencieslists key dependencies, not the complete dependency tree. The intent is to give agents a quick signal about the project’s ecosystem.- For code documentation that also serves as API reference, use
aspects: ["documentation.api_reference"].