Skip to main content

Documentation-as-code bootstrap for AI agents

Project description

adrlane

Documentation-as-code bootstrap for AI agents.

adrlane scaffolds a minimal docs/ layout and agent skills so AI tools know where to read and write project documentation. The agent decides when to update docs — there is no sync pipeline or enforcement.

Install

Global CLI (recommended)

Install adrlane once on your machine with uv:

uv tool install adrlane

From a local checkout:

uv tool install -e .

Verify:

adrlane --help

Development checkout

Clone the repository and install dependencies:

git clone https://github.com/koradon/adrlane.git
cd adrlane
uv sync
uv run adrlane --help

Quick start

Run these commands from your project repository root:

cd /path/to/your-project

# 1. Scaffold docs and install project-local agent skills
adrlane init

# Multi-repo workspace (project root is not a single git repo):
adrlane init --workspace   # adds .adrlane/workspace.yaml for doc routing
# Then run `adrlane init` in each sub-repository for service-level docs.

# 2. Optional: install skills globally (one copy for all projects)
adrlane skills install --global

Preview changes without writing files:

adrlane init --dry-run

Limit which agent adapters init installs:

adrlane init --agent cursor
adrlane init --agent cursor --agent claude-code

After upgrading the adrlane package, refresh skills:

adrlane skills upgrade --global
adrlane skills upgrade --local   # run from a bootstrapped repo

Commands

Command Description
adrlane init Bootstrap docs/ and install agent skills in the current repository
adrlane init --dry-run Show planned bootstrap actions without writing files
adrlane init --agent <name> Limit adapters (cursor, claude-code; repeatable)
adrlane init --workspace Bootstrap with multi-repo doc routing config
adrlane skills install --global Install skills in ~/.cursor/skills/ and ~/.claude/skills/
adrlane skills install --local Install skills in the current repository (skips existing files)
adrlane skills upgrade --global Overwrite global skills with the current package version
adrlane skills upgrade --local Overwrite local skills in the current repository

init and skills --local always use the current working directory — there is no --path flag. Change into the target repository first.

What init creates

init scaffolds a minimal core that grows with the project:

Path Purpose
docs/specs/ What the system should do
docs/plans/ How to implement a spec
docs/adr/ Why significant decisions were made
docs/ideas/ Early concepts that may be promoted to specs
docs/roadmap/ Now / Next / Later horizons
docs/llm/ Agent contract, decision rules, and templates

Templates live in docs/llm/templates/. Documents use markdown sections (## Status, ## Related) — not YAML frontmatter.

When the project gains new documentation needs (runbooks, API reference, CLI docs), the agent adds new folders under docs/ and updates docs/README.md. init does not predict project type.

Release history stays in Git and release tooling — not in docs/.

Agent skills

By default, init installs six skills for Cursor and Claude Code:

Skill Role
adrlane-dev-context Ambient — read specs before coding; propose ADRs after significant decisions
adrlane-write-idea Write or update ideas
adrlane-write-spec Write or update specs (and Gherkin .feature files)
adrlane-write-plan Write or update implementation plans
adrlane-write-adr Document architectural decisions
adrlane-workspace-routing Route docs to project or sub-repo trees (when .adrlane/workspace.yaml exists)

Project-local (default via init): .cursor/skills/ and .claude/skills/ in the repository.

Global (optional via skills install --global): same skills in your home directory, shared across all projects.

Skills are thin adapters; the canonical contract lives in docs/llm/AGENT_PROTOCOL.md and docs/llm/DECISION_RULES.md.

Multi-repo workspace

Use this when the Cursor workspace root is not a single git repository — for example a folder that contains several independent repos plus shared project docs.

Setup

cd /path/to/project-root

# Project-level docs + routing config + skills
adrlane init --workspace

# Service-level docs in each repository
cd repository1 && adrlane init
cd ../repository2 && adrlane init

Open the project root in Cursor so routing applies. Optionally install skills globally once: adrlane skills install --global.

Layouts

Flat — repositories are direct children of the project root. No repo_roots needed:

project/
  docs/                 ← cross-cutting ADRs, specs, roadmap
  repository1/docs/     ← service-specific docs
  repository2/docs/

Grouped — repositories live under category folders. Uncomment and edit repo_roots in .adrlane/workspace.yaml:

project/
  docs/
  services/order-service/docs/
  frontends/checkout-fe/docs/
project_docs: docs
repo_roots:
  - services
  - frontends

How routing works

The adrlane-workspace-routing skill (active when .adrlane/workspace.yaml exists) sends documentation to:

Scope Location Examples
Project docs/ at project root Platform ADRs, cross-service conventions
Service <repo>/docs/ API specs, service-internal decisions

The other adrlane-write-* skills follow the resolved path automatically. Link project and service docs in ## Related.

Contributing

Run tests:

uv run pytest

Install pre-commit hooks:

uv run pre-commit install
uv run pre-commit run --all-files

Dependency management:

uv add <package>          # runtime dependency
uv add --dev <package>    # dev dependency
uv lock                   # refresh lockfile after manual pyproject edits

License

AGPL-3.0-or-later. See LICENSE.

Project details


Download files

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

Source Distribution

adrlane-0.3.0.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

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

adrlane-0.3.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file adrlane-0.3.0.tar.gz.

File metadata

  • Download URL: adrlane-0.3.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for adrlane-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4c54a1b60668e0eaca1ff582a2a6cb8b03c8d2b046057e70d4d0d24d13e5e30a
MD5 857559c40885b5114d1c52ce06252736
BLAKE2b-256 55088a49808ab16e737d189a10a79dda83bb774f5518e5723cd17a26d5a61b0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for adrlane-0.3.0.tar.gz:

Publisher: release.yml on koradon/adrlane

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

File details

Details for the file adrlane-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: adrlane-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for adrlane-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66de2387cfe8da688c9887decdb6f036c676eda7f9cd8f953fdc1c0ca2029012
MD5 49790610e600c073e14bb3c2af1de888
BLAKE2b-256 4e0a8d56b6acf0f812e2d2e89900c7bbd37266156a0b8d95557b0671aad9bd9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for adrlane-0.3.0-py3-none-any.whl:

Publisher: release.yml on koradon/adrlane

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page