nanohype
The factory's vocabulary
Templates, composites, standards, the SDK and the MCP server. What every other repo is described in terms of.
What follows is that repo's AGENTS.md — the entry point an agent reads before working on it. It is rendered from the repo itself at build time rather than copied, so it says what the repo says today. Links in it point back at the repo they were written for.
nanohype — agent entry point
You’re an AI client (or the author of one). This file gets you running in five minutes. For the full picture of how this repo fits into a larger nanohype-stack delivery, read docs/platform-reference.md.
What this repo gives you
- Templates (
templates/<name>/) — 94 scaffolds for AI systems, applications, infrastructure, modules, and non-engineering deliverables. - Composites (
composites/*.yaml) — 25 pre-baked multi-template stacks for common engagements (ai-chatbot, agent-team, enterprise-ai, etc.). - Catalog (
catalog.json) — single machine-readable index of all templates + composites. Stable URL athttps://raw.githubusercontent.com/nanohype/nanohype/main/catalog.json. - Standards (
standards/) — the production bar every nanohype-stack build meets. One JSON file per guardrail, plus a human-readable README. - SDK (
@nanohype/sdk) — TypeScript reference implementation of the rendering algorithm. One runtime dependency (a YAML parser). Works against local paths or the GitHub API. - MCP server (
@nanohype/mcp) — exposes everything above as MCP resources and tools, mountable in Claude Desktop / Claude API / Bedrock agents.
Quickstart (60 seconds)
Fetch the catalog and pick a template:
curl https://raw.githubusercontent.com/nanohype/nanohype/main/catalog.json \ | jq '.templates[] | select(.category == "ai-systems") | .name'Render programmatically (TypeScript):
import { GitHubSource, renderTemplate } from "@nanohype/sdk";
const source = new GitHubSource({ repo: "nanohype/nanohype" });const { manifest, files } = await source.fetchTemplate("rag-pipeline");const result = renderTemplate(manifest, files, { ProjectName: "my-rag-bot", LlmProvider: "anthropic",});// result.files — write these to disk yourself; hooks are returned, not executedOr via MCP (Claude Desktop snippet):
{ "mcpServers": { "nanohype": { "command": "npx", "args": ["-y", "@nanohype/mcp"], }, },}Then ask the model: “List templates in the ai-systems category” — the MCP tool surfaces the catalog directly.
Contract surface
If you’re writing a client (not just consuming):
- Template contract — every
templates/<name>/template.yamlvalidates againstschemas/template.schema.json. Field reference:docs/spec/template-contract.md. - Composite contract — every
composites/<name>.yamlis a multi-template orchestration manifest. Spec:docs/spec/composite-contract.md. - Rendering algorithm — the 10-step scaffolding process the SDK implements. Spec:
docs/spec/consumer-guide.md. - Catalog manifest —
catalog.jsonvalidates againstschemas/catalog.schema.json. Generated bynpm run generate:catalog. - Standards manifests — each
standards/*.jsonvalidates againstschemas/standards.schema.json. One file perkinddiscriminator value.
Add a new template
- Create
templates/<name>/withtemplate.yaml,skeleton/,README.md. - Follow field order:
apiVersion, kind, name, displayName, description, version, license, persona, category, tags, variables, conditionals, hooks, composition, prerequisites. - Placeholders are
__SCREAMING_SNAKE__and appear both in file content and filenames. Variables that drive conditionals arebool. - Run
./scripts/validate.sh templates/<name>— full validation including schema, hook naming, prereqs. - Run
npm run generate:catalogto re-emitcatalog.json. CI verifies no drift. - Open a PR. CI runs
validate:schema(viavalidate:catalog),validate:catalog,validate:standards,verify:catalog, andverify:library.
Add a new composite
- Create
composites/<name>.yaml. Usekind: composite,apiVersion: nanohype/v1. - Reference templates by name; declare entry conditions and variable overrides.
- Validate against
schemas/composite.schema.json(npm run validate:composites). Composites have their own schema; a composite does not satisfy the template schema. - Re-generate the catalog (
npm run generate:catalog).
Add a new standard
Only do this if you’re publishing a new dimension of the production bar that external clients should obey. The existing standards cover the canonical guardrails — language toolchain, version currency, platform-tenant contract, LLM policy, quality-rubric dimensions, testing rubric, resource tagging, resource naming, observability SLOs, telemetry pipeline, SEO baseline. Adding another:
- Add the new
kindenum value toschemas/standards.schema.jsonand a per-kindcontentschema branch. - Write
standards/<new-name>.jsonconforming to your new branch. - Update
standards/README.mdwith the human-readable form. - Bump the SDK’s
loadStandards()return type to include the new field. - CI runs
validate:standards— no extra wiring needed.
Conventions
- 2-space indent for YAML, JSON, TypeScript, Markdown. 4-space for Python. Tabs for Go and Makefiles.
- Templates use
license: Apache-2.0. Hook name is alwaysinstall-dependencies. - All templates include
nestsInside: [monorepo]in composition (exception: themonorepotemplate itself). - Module templates carry a runtime suffix (
-ts,-go,-py) or a framework name (module-spring-security). Unsuffixed names mean the module is language-agnostic. - Skeleton code uses latest stable library versions and idiomatic patterns per language. No LangChain.
Pointers
docs/platform-reference.md— the front door for the whole stack (this repo + 8 supporting repos)docs/spec/— formal contract specificationsstandards/README.md— the production bar in human formCLAUDE.md— Claude Code session instructions for working inside this reposdk/README.md— SDK usage and API reference