Skip to main content

ai-guidelines

ai-guidelines manages reusable Markdown guidelines for a project. It copies explicitly selected files into a project, records their source and SHA-256 hashes, and can reproduce or update that selection safely. It does not execute Markdown.

Install

uv tool install ai-guidelines

guidelines --version

Git is required for remote sources; local folders need no Git.

Quick start

Create guidelines.yml:

version: 1
default_guidelines_path: .github/guidelines
guidelines:
  - source: https://github.com/example/team-guidelines.git
    ref: main
    pattern: "*.guideline.md"

Run guidelines sync, then guidelines list, guidelines search LOCATION QUERY, guidelines outdated, or guidelines update --dry-run. Add sources with guidelines add LOCATION [PATTERN] --ref REF --target-path PATH --alias NAME and remove declarations with guidelines remove IDENTIFIER; installed files are preserved. sync --dry-run previews changes, while sync --frozen replays complete locked state without resolution or writes. Use --refresh and --no-cache with search, and guidelines cache size to inspect the cache. Selectors match both .guideline.md and .guidelines.md source files, including when the suffix is omitted. Missing source paths are reported as concise CLI errors rather than Python tracebacks. Installed files always use the canonical .guidelines.md suffix.

Python facade

from pathlib import Path
from ai_guidelines import load_manifest, parse_location, sync_manifest

manifest = load_manifest(Path("guidelines.yml"))
location = parse_location(manifest.guidelines[0].source)
result = sync_manifest(Path.cwd())
print(location.canonical_source, result)

Documentation

Full documentation — tutorials, how-to guides, CLI and format reference, and design rationale — is at https://ai-guidelines.readthedocs.io/.

Start with the getting-started tutorial. To publish guidelines for your own team, commit them to a Git repository and declare it as a source — see source grammar. For how acquired sources are cached, see how caching works.

See also SECURITY.md and the examples/ directory.

Guideline, instruction, and skill

A guideline is reusable Markdown context containing rules or practices. An instruction file is loaded or injected by an agent according to its file-pattern rules. A skill is a self-describing knowledge package that declares activation or loading behavior. This tool only installs explicitly selected guidelines: it does not inject instructions, activate skills, or decide when an agent should load a file. Put project-owned loading rules in AGENTS.md, CONSTITUTION.md, or another project convention.

Development

Use just install and just preflight: format check, Ruff, strict mypy, pytest with a coverage gate, and a documentation build with warnings as errors. See CONTRIBUTING.md.

Version 1 has no importer and no migration command for lockfiles produced by other tools: any unrecognized lockfile format is rejected with an instruction to regenerate it. Declare your sources in guidelines.yml and run guidelines sync.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_guidelines-1.0.1.tar.gz (274.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_guidelines-1.0.1-py3-none-any.whl (70.6 kB view details)

Uploaded Python 3

File details

Details for the file ai_guidelines-1.0.1.tar.gz.

File metadata

  • Download URL: ai_guidelines-1.0.1.tar.gz
  • Upload date:
  • Size: 274.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ai_guidelines-1.0.1.tar.gz
Algorithm Hash digest
SHA256 07147e2b85d7a026a94c6def636af2d6c9a64aa4ec90216126a0e8183e6f47fe
MD5 e84bb2a70c1ec20dde2371b093ee31e3
BLAKE2b-256 ff1a219795b5828c3ff3489cc64a1c23838b70648a8edc96a1e84366cdfe4066

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_guidelines-1.0.1.tar.gz:

Publisher: publish.yml on gsemet/ai-guidelines

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_guidelines-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ai_guidelines-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 70.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ai_guidelines-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d105bd01fcbbf4b16101ffc3b448b113c6ff4e4fa819966b1e3edf574a9985b3
MD5 70243b161c8ad93444b278f53eebb49b
BLAKE2b-256 3559c49bcc465c965309f503d138f66b76f3017110c79dfeb969a7b21416cc1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_guidelines-1.0.1-py3-none-any.whl:

Publisher: publish.yml on gsemet/ai-guidelines

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.1.0

2 files

This release

1.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page