feat: add gemara://about resource and richer server instructions - #122
feat: add gemara://about resource and richer server instructions#122jpower432 wants to merge 2 commits into
Conversation
Reduces the server's reliance on ad-hoc web fetches by shipping an LLM-optimized Gemara overview (issue gemaraproj#98). - Add a static preamble to the connect-time instructions describing Gemara, the seven-layer model, and artifact types, pointing clients at gemara://about instead of the open web. - Add the gemara://about resource: fetches the LLM-optimized guidance from https://gemara.openssf.org/llms-full.txt with a TTL cache and an embedded offline fallback (internal/server/about.md), mirroring the lexicon pattern. Remote auto-activates once llms.txt lands upstream. - Add fetcher.NewStaticHTTPFetcher for fixed, unversioned HTTPS URLs. Also refresh dependencies and test fixtures to current versions: - Bump testify to v1.12.1. - Bump the test schema pin to the gemara CUE module v1.5.0 and refresh testdata/good-ccc.yaml from upstream to match the current schema. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
Wrap HTTP fetchers with validatingFetcher to validate content BEFORE the CachedFetcher stores it. This prevents invalid 200 responses (e.g. proxy error pages) from poisoning the cache and pinning resources to embedded fallbacks for the entire TTL. Applied to both about and lexicon resources. Also relaxed isValidAbout to strip a leading UTF-8 BOM and tolerate heading variations (requires markdown heading + mentions "Gemara") instead of strict "# Gemara" prefix. Add regression test for cache-poisoning fix. Assisted-by: Claude (Anthropic, Claude Opus 4.8) Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
|
@jpower432 would you like an early review on this PR? |
Yes please @hbraswelrh! Let it in draft while I do something testing, but a review would be great. |
| id: FINOS-CCC | ||
| type: ControlCatalog | ||
| gemara-version: "1.0" | ||
| gemara-version: "1.1.0" |
There was a problem hiding this comment.
@jpower432 thoughts on using the migration assistant to upgrade to v1.5.0? A bulk update may be necessary with the test-data in gemaraproj/gemara see good-ccc.yaml example.
| @@ -0,0 +1,224 @@ | |||
| # Gemara | |||
|
|
|||
| > GRC Engineering Model for Automated Risk Assessment. Gemara provides a logical model describing categories of compliance activities, how they interact, and schemas enabling automated interoperability between GRC tools. Part of the OpenSSF ecosystem. | |||
There was a problem hiding this comment.
Should we include that the Gemara project is governed by the ORBIT Working Group?
| lexiconPathSuffix = "/docs/lexicon.yaml" | ||
| ) | ||
|
|
||
| // gemaraPreamble is a static overview prepended to every mode's instructions. |
There was a problem hiding this comment.
This is incredible! I tested using Claude Opus 4.8 and it worked extremely well on the first run using the MCP server.
hbraswelrh
left a comment
There was a problem hiding this comment.
@jpower432 Left a couple non-blocking comments, but tested with the MCP Server using Claude Opus 4.8. The results were very concise and the output was highly readable. This is a great resource and allows the MCP Server to evolve with consistency over time.
Summary 🤖
Reduces the server's reliance on ad-hoc web fetches by shipping an LLM-optimized Gemara overview (issue #98).
Testing
integration-tagged file.
on the 404.