archgate-pack.yaml
Pack metadata — name, version, description, maintainers, and tags. This is authoritative; the directory path is just an address.
Author your own ADR pack — pack metadata, ADR documents paired with rule files, ambient types, and the submission path to earn a Curated badge.
A pack is a directory of Architecture Decision Records and their executable rules, described by a small metadata file. You can build a pack for your own team’s private repository, or submit it to the official registry for a Curated badge. The structure is identical either way.
Every pack follows the same layout. The key idea is that each ADR is a pair: a Markdown document that humans and AI agents read, and a co-located .rules.ts file that machines execute.
packs/my-pack/ archgate-pack.yaml # pack metadata (required) README.md # overview and ADR listing (required) rules.d.ts # ambient types for .rules.ts (required) adrs/ ADR-001-my-decision.md # ADR document (at least one) ADR-001-my-decision.rules.ts # corresponding rule filearchgate-pack.yaml
Pack metadata — name, version, description, maintainers, and tags. This is authoritative; the directory path is just an address.
ADR documents
Markdown with YAML frontmatter, one decision each. They explain why a choice was made and what trade-offs follow.
Rule files
A co-located .rules.ts per ADR that turns the decision into an automated check archgate check can run.
rules.d.ts
Ambient type definitions so your rule files get full type safety against the rule API.
Create archgate-pack.yaml at the pack root:
name: my-packversion: 0.1.0description: Short description of what this pack covers.maintainers: - github: your-github-usernametags: - language:typescript - concern:securityTags use the <axis>:<value> convention (language:, runtime:, framework:, tool:, concern:, domain:, stack:). They drive filtering in the web builder, so the directory never has to be re-organized when a pack spans two categories.
Each ADR is a Markdown file under adrs/ with YAML frontmatter:
---id: ADR-001title: My Decisiondomain: architecturerules: truefiles: ["**/*.ts"]---Follow the frontmatter with these sections, in order: ## Context, ## Decision, ## Do's and Don'ts, and ## Consequences. Set rules: true when the ADR ships a paired rule file, and use files to scope which paths the rule applies to.
Pair each rule-bearing ADR with a <adr-id>-<slug>.rules.ts file in the same adrs/ directory. Every rule file must:
/// <reference path="../rules.d.ts" />satisfies RuleSetRuleContext API — glob(), grep(), grepFiles(), readFile(), readJSON(), and report.violation() / report.warning() / report.info()asyncHere is the rule paired with the SEC-001-no-secrets-in-code ADR in the curated security pack, abridged:
/// <reference path="../rules.d.ts" />
export default { rules: { "no-secrets-in-code": { description: "Source files must not contain hardcoded secrets, API keys, or tokens", async check(ctx) { const sourceGlob = "**/*.{ts,tsx,js,jsx}"; const matches = await ctx.grepFiles( /API_KEY\s*=\s*["'][^"']{8,}["']/u, sourceGlob, ); for (const m of matches) { if (m.file.includes(".env.example")) continue; ctx.report.violation({ message: "Possible hardcoded API key — do not hardcode secrets.", file: m.file, line: m.line, fix: "Move the secret to an environment variable and read it via `process.env`.", }); } }, }, },} satisfies RuleSet;The rules.d.ts file supplies ambient types for RuleSet, RuleContext, GrepMatch, the report API, and PackageJson. Copy it from any curated pack so your editor and the validator agree on the contract.
Write a README.md that names the pack, gives a one-line description, lists the included ADRs in a table (ID and title), and shows the archgate adr import packs/<name> quick-start command. This is what renders on the pack’s detail page in the builder.
To get your pack hosted in the registry with a Curated badge:
Fork archgate/awesome-adrs and create packs/my-pack/ with the files above.
Validate locally — every .rules.ts must compile without errors, and the archgate-pack.yaml and rule-file structure must pass CI validation.
Open a pull request using the curated pack PR template. A maintainer reviews and approves it.
Once merged, the pack is importable by anyone with archgate adr import packs/my-pack.
You do not have to submit to the official registry. The same structure works in any git repository, and consumers import it with the git URL or <org>/<repo>/<path> form — no publishing step required. A team’s own ADR set is just a pack at a path in their repo.