teamdocs

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VisibilityAlways  = "always"
	VisibilityIndexed = "indexed"
	VisibilityHidden  = "hidden"
)

Visibility levels control how docs are disclosed to agents during prime.

Progressive disclosure model (inspired by Agent Skills spec):

  • "always" — content auto-inlined into prime output. Reserved for future use; intended for small, universally-needed docs (<200 tokens) like glossaries. Not yet implemented — accepted as a valid value but treated as "indexed" for now.
  • "indexed" — listed in catalog with title + description + when triggers. Agent reads full content on demand when task matches. This is the default.
  • "hidden" — not visible to agents at all. Use for human-only docs, drafts, meeting notes, or directory instructions (like README.md).
View Source
const DefaultVisibility = VisibilityIndexed

DefaultVisibility is the visibility applied when frontmatter omits the field. Docs in team context docs/ are visible by default — the whole point of the directory is sharing knowledge with the team, including AI coworkers.

Variables

This section is empty.

Functions

This section is empty.

Types

type TeamDoc

type TeamDoc struct {
	Name        string `json:"name"`                  // filename (e.g., "principles.md")
	Title       string `json:"title"`                 // from frontmatter or first H1 heading
	Description string `json:"description,omitempty"` // one-line summary for catalog
	Path        string `json:"path"`                  // absolute path — agent reads on demand
	When        string `json:"when,omitempty"`        // natural language triggers for when to read
	Visibility  string `json:"visibility"`            // always | indexed | hidden
}

TeamDoc represents a single team document discovered from the docs/ directory within a team context. These docs are cataloged during ox agent prime so agents know what's available and when to read each document on demand.

func DiscoverDocs

func DiscoverDocs(teamPath string) ([]TeamDoc, error)

DiscoverDocs scans the docs/ directory in a team context for markdown files and returns a catalog of documents visible to agents.

Only .md files are processed. Rationale:

  • Agents read markdown natively — no conversion tooling needed
  • YAML frontmatter is a markdown convention with universal tooling support (Jekyll, Hugo, Obsidian, VS Code, Agent Skills spec)
  • Token estimation is trivial for text content
  • Non-markdown assets (images, PDFs, data files) need entirely different disclosure mechanisms and are out of scope for this catalog

README.md is always excluded — it contains instructions about the directory itself, not content for agents. Server-side hardcodes this as hidden.

Returns only docs with visibility != "hidden". Sorted by filename for stable, deterministic output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL