Browse / Software development / Polylith-Workspace-Template

Polylith-Workspace-Template

ri1550

A Polylith workspace for Python where the codebase carries its own context: ADR decision log, per-brick docs, and enforced process gates for humans and AI agents.

Open ri1550/Polylith-Workspace-Template → Does not match the four rules.

Works with any agent

ships AGENTS.md, the cross-tool instruction file.

In its own words

README.mdri1550/Polylith-Workspace-Template

Workspace

A Polylith monorepo. Code lives as small bricks (components and bases) that combine into deployable projects, and the repo keeps its own context so anyone, human or AI agent, can understand why things are the way they are.

Getting started

You need uv. Then, from this directory:

git init # if this is not already a git repo uv sync # create the env, install deps and the poly tool uv tool install pre-commit # the check runner pre-commit install # turn the checks on for this repo

uv sync also makes the myorg namespace importable, so the bricks work without any PYTHONPATH fiddling.

Run it

The example base has an entry point that delegates to the greeting component:

uv run python -c "from myorg.api.core import main; print(main())"

- Hello, world!

Common commands

uv run pytest # run all tests uv run poly check # validate the workspace (boundaries, interfaces) uv run poly info # overview of bricks and projects uv run poly diff # show which bricks changed since the last tag uv run poly deps # show dependencies between bricks uv run poly libs # show third-party libraries in use

Create new bricks

uv run poly create component --name # business logic, shared uv run poly create base --name # a thin entry point uv run poly create project --name # a deployable artifact

Quoting 47% of the README. Read the rest on GitHub ↗

Read from the repository's git tree on 2026-08-17.