Skip to content

Documentation agent optimisation. Closes #20#21

Open
binaek wants to merge 23 commits into
mainfrom
20-restructure-documentation-for-agent-centric-discovery-llmo
Open

Documentation agent optimisation. Closes #20#21
binaek wants to merge 23 commits into
mainfrom
20-restructure-documentation-for-agent-centric-discovery-llmo

Conversation

@binaek

@binaek binaek commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

If merged, this pull request will overhaul the sentrie.sh documentation to a brutalist, structured, agent-optimized format with a universal page template, rewritten reference and concept pages, and six-domain navigation (Getting Started, Language Concepts, Language Reference, TypeScript Modules, Extensibility, Deployment & Operations).

Summary

This PR implements the Documentation Agent Optimization plan: machine-readable docs with high signal-to-noise, strict schemas, explicit types and constraints, and no marketing fluff.

What changed

  • Phase 1 – Universal template: Added docs-template.md at repo root (exact Appendix format). All new/rewritten pages follow it (Syntax → Parameters → Examples → Behavior & Constraints).
  • Phase 2 – Content migration:
    • Getting Started: introduction.md (determinism, core philosophy), quick-start.md (install + first evaluation). Content from what-is-sentrie, why-sentrie, installation, writing-your-first-policy, running-your-policy preserved and restructured. Homebrew installation removed from installation and quick-start (not stable yet); install script is the documented method on macOS.
    • Language Concepts: New section with type-system-shapes.md, policy-composition.md (from exporting-and-importing-rules), pattern-matching-conditionals.md. Focus on “how it works.”
    • Language Reference: All reference pages rewritten to strict dictionary/API format (index, namespaces, policies, rules, facts, let, types-and-values, constraints, trinary, shapes, arithmetic/boolean/collection operations, functions, precedence, security-and-permissions). No tutorial narrative; explicit types and edge cases. Export/import content moved to Language Concepts; using-TypeScript content moved to Extensibility.
    • TypeScript Modules: Structure kept (reference/typescript_modules/ with index + 12 sentrie/*.md). Each page restructured per template; “Behavior & Constraints” added where missing. TypeScript Modules is a top-level sidebar section (brought up from under Reference).
    • Extensibility: extensibility/writing-custom-typescript-modules.md (from reference/using-typescript). Paths, use syntax, @local, aliasing preserved.
    • Deployment & Operations: deployment-operations/cli-reference.md, deployment-operations/running-as-service.md with strict HTTP API and error format. No new dependencies.
  • Phase 3 – Navigation & homepage: Sidebar in astro.config.mjs replaced with six domains. Homepage hero and six feature cards updated to route to the new sections (Quick Start → quick-start, Type-Safe Inputs → types-and-values, Expression Language → arithmetic-operations, Composable Policies → policy-composition, TypeScript Integration → typescript_modules, Run as a Service → running-as-service).

Why

  • Agent/LLM consumption needs deterministic structure, explicit types, and minimal narrative. The template and rewrites make the docs zero-shot friendly and preserve all technical information while stripping fluff.

Page length

  • Plan rule: no page exceeds 5 min reading time; split by subtopic without dropping information. New/rewritten pages are kept concise; longer existing modules (e.g. js.md) retain full content with template sections added; no splits were required for current page set.

Review focus

  • Confirm /reference reads as a strict dictionary (no tutorial tone).
  • Spot-check one page per domain for template adherence (intro → Syntax → Parameters → Examples → Behavior & Constraints).
  • Verify all six homepage card links and sidebar slugs match the new paths.
  • Old pages (e.g. getting-started/installation, reference/exporting-and-importing-rules, cli-reference/) still exist and still build; only the sidebar and homepage point at the new structure. Redirects or removal of old pages can be a follow-up.

Reviewer Q&A

  • Information loss? No. Technical content from existing pages was preserved; only narrative/marketing and redundant “best practices” were removed. Moved content (export/import, using-TypeScript) lives in language-concepts and extensibility.
  • TypeScript modules? All 12 module docs plus overview remain under reference/typescript_modules/; they are restructured to the template and appear under the top-level “TypeScript Modules” sidebar group.

Testing

  • yarn build passes (64 pages built).
  • Frontmatter fixed for any description containing a colon (YAML-quoted) so the content collection parses.
  • No new or changed npm/yarn dependencies.

Dependencies

  • None. Documentation-only changes; no new packages or lockfile updates.

…ness

This commit introduces significant updates to the Sentrie documentation, enhancing the organization and accuracy of information across various sections.

**Key Changes:**

- **Getting Started Section**:
  - Replaced outdated entries with new content, including an introduction to Sentrie and a quick start guide for installation and policy evaluation.

- **Language Concepts**:
  - Added comprehensive documentation on pattern matching, conditionals, and the type system, including shapes and constraints.
  - Introduced a new guide on policy composition, detailing the export and import of rules.

- **Reference Documentation**:
  - Updated arithmetic and boolean operations documentation to reflect current syntax and examples.
  - Created a new CLI reference page detailing commands and their parameters.

- **Extensibility**:
  - Added documentation for writing custom TypeScript modules, including syntax and usage examples.

- **Deployment Operations**:
  - Introduced new pages for running Sentrie as a service and CLI reference, detailing commands and expected behaviors.

**Benefits:**

- Improved clarity and usability of documentation for new and existing users.
- Enhanced organization of content for easier navigation and understanding.
- Comprehensive coverage of new features and concepts introduced in recent updates.

## Testing

- Documentation reviewed for accuracy and consistency.
- All new pages and updates verified for correct rendering and functionality.

## Dependencies

- None - documentation-only changes.
@binaek binaek self-assigned this Feb 20, 2026
@binaek binaek linked an issue Feb 20, 2026 that may be closed by this pull request
28 tasks
@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

A preview of this PR has been deployed to https://sentrie-pr-21.surge.sh:

🔗 View Preview at https://sentrie-pr-21.surge.sh

This preview will be automatically removed when the PR is merged or closed.

This commit improves the Sentrie documentation by refining formatting, enhancing descriptions, and ensuring consistency in terminology.

**Key Changes:**

- **Parameter Tables**: Standardized formatting for parameter tables across various documentation files for better readability.
- **Return Descriptions**: Updated return descriptions to use consistent punctuation, changing from "—" to "-" for clarity.
- **Content Refinements**: Made minor adjustments to text for improved flow and clarity, including removing unnecessary line breaks and ensuring concise explanations.

**Benefits:**

- Improved readability and user experience for documentation.
- Consistent formatting enhances the professional appearance of the documentation.

## Testing

- Documentation reviewed for accuracy and consistency.
- All changes verified for correct rendering and functionality.
…ion, writing your first policy, and running policies
…perations with comprehensive details and examples
…t package manager and streamline build process
…, ensuring accurate representation of behavior in the language.
…ny`, `all`, `count`, `distinct`, `reduce`, and `filter`. Clarify usage of loop variables and recursive value comparison in membership operations for maps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restructure Documentation for Agent-Centric Discovery (LLMO)

1 participant