Repository navigation
Add semantic validation and integration recipes - #9
Conversation
Signed-off-by: Larah Vasquez <larah@tailscale.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Larah Vasquez <larah@tailscale.com>
Signed-off-by: Larah Vasquez <larah@tailscale.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The updated template guidance for non-hook integrations is incomplete (can leave validator-triggering template residue), and at least one new recipe contains a documentation formatting issue that should be corrected before merge.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
This PR expands aperture-recipes’ deterministic integration validator beyond frontmatter/heading checks by adding semantic validation of documented configuration (hooks, grants, provider settings, event/send compatibility), updating templates and submission guidance to separate provider/tool configuration from grants, and adding new integration recipes plus fixtures/tests to keep the validator behavior stable.
Changes:
- Add semantic validation (configuration JSON parsing + type-aware rules) and corresponding positive/negative fixtures across all four integration types.
- Update templates, contribution docs, and submission forms to clearly separate provider configuration, external tool configuration, and model-access grants (and align existing hook recipes).
- Update CI to run validator tests/typecheck when validation-related files change, and refine “trusted author” logic for
officialstatus handling.
| File | Description |
|---|---|
| templates/README.md | Clarifies which template sections apply to hooks vs providers vs tools. |
| templates/integration.md | Restructures template into type-specific configuration/grant sections and updates warnings/callouts text. |
| README.md | Expands the “Example submissions” list to include newly added recipes. |
| integrations/tools/opencode/README.md | Adds a new tool integration recipe for OpenCode. |
| integrations/tools/.gitkeep | Retains placeholder file under tools directory. |
| integrations/providers/openrouter/README.md | Adds a new provider integration recipe for OpenRouter. |
| integrations/providers/.gitkeep | Retains placeholder file under providers directory. |
| integrations/hooks/pre-request/tsheadroom/README.md | Updates cache-impact guidance and strengthens verification/troubleshooting specificity. |
| integrations/hooks/pre-request/ssn-scrubber/README.md | Clarifies this repo documents (but doesn’t host) the endpoint; replaces example secret; improves verification steps. |
| integrations/hooks/pre-request/highflame/README.md | Minimizes pre-request send payload and updates security guidance accordingly. |
| integrations/hooks/post-response/cribl/README.md | Adds a new post-response hook recipe for Cribl with minimal-cost observability wiring. |
| integrations/hooks/post-response/.gitkeep | Retains placeholder file under post-response directory. |
| CONTRIBUTING.md | Adds local validation instructions and explains validator behavior and autofix constraints for forks. |
| .github/workflows/validate-integration.yml | Expands workflow path triggers, runs validator tests/typecheck, updates trusted-author logic, and collects fixes even on failure. |
| .github/scripts/validate-integration/tsconfig.json | Updates TS config to include tests and adjust rootDir. |
| .github/scripts/validate-integration/tests/semantics.test.ts | Adds semantic validation test coverage and fixture orchestration checks. |
| .github/scripts/validate-integration/tests/fixtures/positive/tool.md | Adds a positive tool fixture for semantic validation. |
| .github/scripts/validate-integration/tests/fixtures/positive/provider.md | Adds a positive provider fixture for semantic validation. |
| .github/scripts/validate-integration/tests/fixtures/positive/pre-request.md | Adds a positive pre-request hook fixture (incl. dual-type coverage). |
| .github/scripts/validate-integration/tests/fixtures/positive/post-response.md | Adds a positive post-response hook fixture for semantic validation. |
| .github/scripts/validate-integration/tests/fixtures/negative/tool.md | Adds a negative tool fixture covering template residue/invalid grants. |
| .github/scripts/validate-integration/tests/fixtures/negative/provider.md | Adds a negative provider fixture covering missing providers map / invalid grant usage. |
| .github/scripts/validate-integration/tests/fixtures/negative/pre-request.md | Adds a negative pre-request hook fixture for invalid hook/grant fields/events/send. |
| .github/scripts/validate-integration/tests/fixtures/negative/post-response.md | Adds a negative post-response fixture for invalid event values. |
| .github/scripts/validate-integration/src/types.ts | Updates required section groups and adds non-hook section requirements. |
| .github/scripts/validate-integration/src/structure.ts | Enforces provider/tool-specific required sections when non-hook types are present. |
| .github/scripts/validate-integration/src/semantics.ts | Introduces semantic validation for hooks/providers/grants/events/send and verification substantiveness checks. |
| .github/scripts/validate-integration/src/index.ts | Refactors validation to support testing and adds semantic validation to orchestration; updates trusted-author handling. |
| .github/scripts/validate-integration/src/frontmatter.ts | Normalizes additional_types and updates official status gating to trusted-author logic. |
| .github/scripts/validate-integration/src/callouts.ts | Makes callout injection type-aware for provider/tool sections and expands cache-warning detection. |
| .github/scripts/validate-integration/package.json | Adds npm test and switches scripts to local tsx. |
| .github/PULL_REQUEST_TEMPLATE.md | Updates contributor/reviewer checklists for type-specific examples and hook testing expectations. |
| .github/ISSUE_TEMPLATE/integration-submission.yml | Updates issue submission form to capture provider/tool-specific configuration/grant sections. |
| .github/instructions/integration-review.instructions.md | Updates reviewer guidance (dst/location labeling and provider/tool distinctions). |
| .github/copilot-instructions.md | Updates repo-level Copilot instructions to reflect semantic validation and new section requirements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Summary
Check integration documentation for configuration errors, not just required headings and frontmatter. Add recipes for Cribl, OpenRouter, and OpenCode.
officialfrontmatter and retain its documentation updates.This PR does not change the Aperture runtime.
Verification
npm test: 26 tests passed. The mixed-event regression test failed before the fix and passed after it.npx tsc --noEmit: passed.npm run validate: all six integration recipes passed with no issues or automatic fixes.officialstatus. Fork collaborators, contributors, and missing associations did not. Members and owners remained trusted.git diff --cached --check: passed.true; all six recipes passed with no automatic fixes.The recipes have not been tested against a live Aperture gateway. The mixed-result artifact collection was checked locally, not in the hosted run.