FreeDomain
Free domain registration and practical DNS learning resources for everyone.
- 209k
- Markdown
- AGPL-3.0
- 3 mo ago
A template for building structured, self-healing, agent-accessible knowledge bases. Zero dependencies. Git-native. Ontology-driven. Multi-output.
Repo snapsynapse/knowledge-as-code-template, read from GitHub 1 min ago. snapsynapse has not joined Take My Repo.
snapsynapse/knowledge-as-code-template is a public repo on GitHub by snapsynapse. A template for building structured, self-healing, agent-accessible knowledge bases. Zero dependencies. Git-native. Ontology-driven. Multi-output. It declares the MIT license on GitHub. It is written mainly in JavaScript, has 8 stars and last changed on 2026-10-10. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A zero-dependency generator for evidence-backed reference sites. Keep structured knowledge in Git-tracked Markdown and YAML, then build a searchable HTML site, JSON API, discovery files, and an optional local MCP interface.
This repository is an internal-first open utility maintained by PAICE.work PBC. It supports active reference projects inside the PAICE and Snap Synapse portfolios. Public issues and contributions are welcome on a best-effort basis.
Maintainers of public registries, comparison databases, compliance maps, and other structured references where claims need sources, review dates, and machine-readable output.
Structured references often duplicate the same claims across a website, API, search index, and agent interface. This template keeps one typed source in plain text, validates its relationships and review dates, and generates consistent human- and machine-readable outputs.
https://knowledge-as-code.com/
Live demo → — the output of this template's example data, deployed on GitHub Pages. Includes a searchable HTML site, coverage matrix, timeline, comparison tool, and JSON API.
Maintainer-operated implementations of this architecture:
git clone https://github.com/snapsynapse/knowledge-as-code-template.git.node scripts/init.js ../my-knowledge-base. The guided initializer asks for the reference name, URL, repository, and plain-language names for the four entity roles. It changes project identity and display labels; the worked ISO/NIST teaching fixture remains until you replace it.cd ../my-knowledge-base. It contains the engine, one worked example, the MCP runtime, and deployment workflows without this canonical site's landing files or history.node scripts/validate.js and node scripts/build.js, then open docs/index.html.main. The included workflow builds and publishes docs/. See Deployment for custom domains and subpaths.data/_schema.md and the worked records under data/examples/ as the starting point for your domain.For a reproducible non-interactive project using the starter labels, run node scripts/init.js ../my-knowledge-base --defaults. The initializer refuses to overwrite an existing target directory.
This canonical repository tracks only the generated demo/ published at https://knowledge-as-code.com/demo/.
docs/ is transient local output used by builds, tests, and initialized projects. It is ignored here.demo/ is the tracked canonical reference build.node scripts/build.js; refresh the tracked demo with KAC_OUTPUT_DIR=demo KAC_SITE_URL="https://knowledge-as-code.com/demo/" KAC_REPO_URL="https://github.com/snapsynapse/knowledge-as-code-template" node scripts/build.js.api/, assets/, entity/bridge page directories, and generated root files). It refuses to clean the repository root or a parent directory.docs/api/v1/mcp-server.js; it runs separately from the static build. Dual-era: speaks MCP spec 2026-07-28 (stateless, server/discover, cacheable tool lists) and legacy 2024-11-05, so generated projects work with both current and older MCP clients/demo/project.yml # Domain configuration (edit this first)
data/
examples/ # Example data (replace with your own)
primary/ # Stable anchor entities (e.g., requirements, obligations)
container/ # Grouping entities (e.g., frameworks, regulations)
authority/ # Source entities (e.g., organizations, regulators)
mapping/ # index.yml connecting containers to primaries
scripts/
init.js # Clean-project initializer (canonical repo only)
build.js # Config-driven site generator
validate.js # Cross-reference validator
docs/ # Generated output (do not edit)
Every knowledge-as-code project has four entity roles:
Authority → Container → Provision → Primary
| Role | What it is | Example domains |
|---|---|---|
| Primary | Stable anchors that don't change when sources change | Requirements, Obligations, Capabilities, Controls |
| Container | Grouping entities that contain provisions | Regulations, Frameworks, Products, Standards |
| Authority | Source entities that produce containers | Regulators, Vendors, Standards bodies |
| Secondary | Mapping entities connecting containers to primaries | Provisions, Implementations, Mappings |
Primaries are stable; containers are unstable. When a framework is amended, its provisions change, but the underlying requirements persist.
project.yml data/examples/
(names, colors, config) (one .md file per entity)
\ /
\ /
+----> scripts/build.js <----+ data/examples/mapping/index.yml
| (connects containers to primaries)
+------------+------------+
| | |
docs/ docs/ docs/api/v1/
(HTML site) llms.txt (JSON API)
(sitemap) agents.json context.jsonld
You edit project.yml and data/. The build script reads both and writes everything under docs/. You never edit docs/ directly.
By default, every built site includes a semantic layer backed by gist — a minimalist upper ontology for the enterprise by Semantic Arts. This adds:
@type annotations on every item in the JSON API (e.g. "@type": "gist:KnowledgeConcept")api/v1/context.jsonld — a JSON-LD context file mapping KaC terms to gist IRIsontology block in api/v1/index.json with the framework name, base IRI, and attributionThe default role-to-class mapping:
| KaC role | gist class |
|---|---|
| primary | gist:KnowledgeConcept |
| container | gist:Specification |
| authority | gist:Organization |
| secondary | gist:Commitment |
Override any mapping in project.yml under ontology.entities.<role>.gist_class. To disable entirely:
ontology: enabled: false
When enabled, CC BY 4.0 attribution to Semantic Arts is required on any published site. The attribution string is included automatically in api/v1/index.json.
All domain-specific settings live in project.yml:
Generated pages normalize external URLs to https and bare domains. Avoid http, javascript:, and www in project data; unsafe protocols are dropped from generated links. Configured colors should be hex values such as #4fc3f7; invalid color values fall back to safe defaults.
Set deployment.custom_domain only when the generated artifact itself is published at that hostname. Leave it empty for GitHub Pages project paths and other shared-host subpaths. CNAME is generated only from this explicit hostname.
Entity filenames and mapping IDs must be lowercase slug IDs: a-z, 0-9, and single hyphens only, such as access-control or iso-27001. The filename without .md is the entity ID. Mapping references must use those same IDs. node scripts/validate.js and node scripts/build.js both reject unsafe IDs before generated HTML, filesystem paths, JSON discovery files, or MCP responses are produced.
The template ships with example data in data/examples/ (ISO/IEC 27001, NIST CSF). To replace it with your own domain:
Update project.yml -- rename entity types, groups, statuses, and colors to match your domain. The directory names under entities.*.directory control where the build script looks for files.
Delete example files -- remove the contents of data/examples/requirements/, data/examples/frameworks/, data/examples/organizations/, and data/examples/mapping/index.yml.
Create your data files -- add markdown files following the format documented in data/_schema.md. Each entity type has specific frontmatter requirements and body structure.
Update the mapping file -- create entries in data/examples/mapping/index.yml that connect your containers to your primaries.
Validate and build:
node scripts/validate.js # Check cross-references node scripts/build.js # Generate the site
For repo-level verification before opening a PR, prefer:
npm run evalThat runs the broader smoke/eval suite covering builds, links, API shape, parser fixtures, MCP smoke, and documentation consistency.
The build script looks for data in data/examples/ first, then data/. For a flatter structure, move the entity and mapping directories from data/examples/ directly into data/, then remove the empty data/examples/ directory and update any mapping source_file paths. Keep filenames slug-safe because the generated site, JSON API, MCP tools, search index, sitemap, and agents.json all use the filename-derived IDs.
The mapping keys regulation and obligations are stable 1.x wire keys even when the displayed entity labels are changed. regulation contains a container ID and obligations contains primary IDs.
What to keep: Only data/ contents and project.yml values need replacing. Do not delete scripts/, .github/workflows/, mcp-server.js, mcp.json, or package.json — these are the template engine and deployment config.
node scripts/build.js # Build the site (or: npm run build) node scripts/validate.js # Validate cross-references (or: npm run validate) node scripts/verify.js # Check entity freshness (or: npm run verify) node scripts/check-links.js # Check generated internal links, including subpath builds node scripts/eval.js # Run smoke, link, API, parser, MCP, and docs evals (or: npm run eval)
Generated sites include machine-readable discovery files:
docs/llms.txt with entity model, API endpoints, and entity listings.docs/agents.json for agent discovery.docs/index.xml.docs/api/v1/.Initialized projects also include mcp-server.js, which provides separate read-only access to all entities through Model Context Protocol. The canonical repository additionally carries a human-verifiable assistant guide at /.well-known/assistant-guide.txt for local verification and generated-output refresh work.
This repository adopts the GuideCheck Human-Verifiable Assistant Guide profile and targets Level 4, which requires an independently published provenance anchor. Local verification establishes at most Level 3; the achieved level must be reported from a verifier result for the exact guide bytes and published anchors. Level 5 is a runtime claim and is not asserted by this repository.
Published artifacts:
/.well-known/assistant-guide.txt - canonical guide/assistant-guide.txt - repository-root copy, byte-identical to the canonical guide/.well-known/assistant-guide-manifest.txt - sidecar manifest carrying the guide hash and byte countAssistants should verify the guide with https://guidecheck.org/verify or another conformant verifier, report the achieved level and SHA-256, and ask for explicit user confirmation before executing any action blocks.
Generating equivalent GuideCheck artifacts for initialized projects is tracked in the GuideCheck implementation roadmap.
The MCP server exposes your knowledge base as tools that AI agents can call. Tool names are dynamically generated from your project.yml entity configuration.
Add to Claude Code (or any MCP-compatible client) via mcp.json:
{
"mcpServers": {
"knowledge-base": {
"command": "node",
"args": ["mcp-server.js"],
"description": "Read-only access to the knowledge base"
}
}
}Test it directly:
node mcp-server.js
The server reads project.yml at startup and exposes tools for listing and retrieving each entity type. Tool names are derived from your entity config by lowercasing and replacing non-alphanumeric characters with hyphens:
| Config value | Tool name |
|---|---|
plural: Requirements |
list_requirements |
name: Requirement |
get_requirement |
plural: Frameworks |
list_frameworks |
name: Framework |
get_framework |
plural: Organizations |
list_organizations |
name: Organization |
get_organization |
Three fixed tools are always present regardless of config: search, get_matrix, and get_mappings.
node scripts/validate.js checks cross-references before building. The 1.2.0 validation contract is stricter about mapping authority, source headings, and optional source files; see MIGRATION.md before upgrading. Common errors and fixes:
| Error message | Cause | Fix |
|---|---|---|
Mapping "X" references unknown container "Y" |
regulation field in mapping doesn't match any container filename |
Check the container file exists and the regulation value matches the filename (without .md) |
Mapping "X" references unknown primary "Y" |
obligations entry doesn't match any primary filename |
Check the primary file exists and the ID matches |
Mapping "X" references unknown authority "Y" |
authority field doesn't match any authority filename |
Check the authority file exists |
Container "X" references unknown authority "Y" |
authority frontmatter in container file doesn't match any authority |
Create the authority file or correct the ID |
No data directory found |
Neither data/examples/ nor data/ exists |
Check your data directory path and config |
node scripts/verify.js detects stale, never-reviewed, future-dated, and invalid entities; checks required evidence URLs; and validates cross-reference completeness. A weekly GitHub Actions workflow runs the deterministic checks and opens an issue when review is needed. It does not independently establish factual accuracy. An optional executable JSONL contract lets maintainers attach a local model, hosted service, browser workflow, or human-review adapter without changing the core.
See VERIFICATION.md for the deterministic checks, CI integration, and extension contract.
External transferability has a documented evidence gate. If you are evaluating the generator for a real new domain, follow ADOPTION.md and submit the included pilot report instead of treating repository traffic or a maintainer-led demo as proof of adoption.
Knowledge as Code is part of a broader set of open standards:
This implementation combines six established practices:
These ideas build on docs as code, living documentation, GitOps, and earlier uses of the term “knowledge as code.” The contribution here is a small working generator and a specific Primary/Container/Authority/Secondary reference model, not a claim to have originated the broader category. See knowledge-as-code.com for the maintained public explanation.
Knowledge as Code is a PAICE.work project. See ATTRIBUTION.md for details.
The default semantic layer uses gist by Semantic Arts, Inc., licensed under CC BY 4.0. Required attribution: "Semantic Arts, Inc. gist ontology (CC BY 4.0) https://semanticarts.com/gist".
When you use this template, update the following:
project.yml with your domain entities, colors, and site identitydata/examples/ with your ownmain; .github/workflows/pages.yml builds and publishes docs/Knowledge as Code is free and open. If you build on this template, consider sponsoring its development. See SPONSORS.md.
Knowledge as Code is a PAICE.work project. PAICE.work PBC is a public benefit corporation building infrastructure for productive collaboration between humans and autonomous agents. Structured, version-controlled, agent-accessible knowledge is a foundation for that collaboration.
MIT
snapsynapse/knowledge-as-code-template is a public repo on GitHub by snapsynapse. A template for building structured, self-healing, agent-accessible knowledge bases. Zero dependencies. Git-native. Ontology-driven. Multi-output.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-10-10. GitHub counts 0 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.

Free domain registration and practical DNS learning resources for everyone.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

A curated list of free public APIs — searchable, community-maintained, with a free JSON API.

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Reverse engineer anything with agents, from app behavior down to native binaries.
Convert Substack posts to clean, Obsidian-friendly Markdown using your authenticated browser session.
Evidence-backed reference for AI capabilities, pricing tiers, availability, and platform support across ChatGPT, Claude, Gemini, Copilot, and more.
Auditable peer disagreement for LLM agents: a thin, file-based governance layer with a human arbiter and no orchestrator.
Version identity and integrity verification for Agent Skills. Tracks versions, detects staleness, and verifies bundle integrity with SHA-256 hashes across sessions, surfaces, and platforms.
AI setup guides can hide instructions a model reads but a human never sees. GuideCheck is the plain-text standard that makes an assistant's instruction surface reviewable before it acts.
Manage Elgato Prompter scripts from CLI or local web GUI: import, export, rename, reorder, backup, restore.
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/snapsynapse/knowledge-as-code-templateTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.