Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
0402a50
Merge pull request #84 from bechtleav360/chore/fold-unreleased-into-0…
solicho Sep 4, 2026
ceca96f
Merge pull request #90 from bechtleav360/develop
HarschPrajapati Sep 7, 2026
76a0ed0
docs(grouping): normative spec, implementation plan and the working r…
Astrasu Sep 14, 2026
75529e1
fix(eventing): P0-P3, make the transport safe for more than one repli…
Astrasu Sep 14, 2026
54eed9d
feat(eventing): P4, deduplicate events on request and never by default
Astrasu Sep 14, 2026
ced9f7f
feat(scheduling): P5, make the scheduler mode a stated choice and fir…
Astrasu Sep 14, 2026
9854612
feat(namespaces): P6, the transport client belongs to a namespace
Astrasu Sep 14, 2026
b4e2529
fix(actuators): stop /status/env returning credentials in clear (#91)
Astrasu Sep 14, 2026
ae3adf6
feat(config): give each namespace a scoped view over one loaded tree
Astrasu Sep 14, 2026
c818a12
feat(component): resolve components and caches per agent
Astrasu Sep 14, 2026
8ff9ae9
feat(eventing): host a group in one process, each event to one agent
Astrasu Sep 14, 2026
d098183
feat(group): resolve the hosted group and serve it from the entry point
Astrasu Sep 14, 2026
4b9eaa1
refactor(app-builder): one declaration surface, assembled into a group
Astrasu Sep 14, 2026
2ff4b0e
docs: write AGENTS.md, guard its design rules, and settle the cache d…
Astrasu Sep 14, 2026
f07c97d
feat(observability): give each agent its own identity, probe and alarm
Astrasu Sep 14, 2026
78642fa
feat(generator): scaffold a project that is a group of one, and valid…
Astrasu Sep 14, 2026
e95b502
docs(guides): multi-agent setup, migration, and a deployment guide th…
Astrasu Sep 14, 2026
8bf18a6
test(split): settle the unit/integration split so broker tests have s…
Astrasu Sep 14, 2026
81fee2b
feat(grouping): close the isolation routes and make a scaffolded proj…
Astrasu Sep 14, 2026
2aabb57
chore(gitignore): ignore .secrets.toml, the name the framework loads
Astrasu Sep 14, 2026
cecbf9c
docs(readme): document the group path beside the standalone one
Astrasu Sep 14, 2026
3322f4e
docs(spec): record where each acceptance criterion actually stands
Astrasu Sep 14, 2026
66aa9ad
chore(release): write the release changelog and bump the version
Astrasu Sep 14, 2026
3dc88f0
fix(test): drop an example directory that exists only as bytecode
Astrasu Sep 14, 2026
76eeeef
Merge origin/develop: integrate 0.7.0 and 0.8.0, release as 0.9.0
Astrasu Sep 14, 2026
3a305c3
fix(config): load the environment the project actually resolved (#89)
Astrasu Sep 14, 2026
c027d66
docs(readme): install instructions for TestPyPI that actually work
Astrasu Sep 14, 2026
424d9dc
feat(docs): ship the documentation inside the package
Astrasu Sep 15, 2026
ec6048c
fix(ci): keep ruff format off the packaged documentation
Astrasu Sep 16, 2026
aba6621
fix(group): read each agent's files from the root its map entry states
Astrasu Sep 16, 2026
18264c9
feat(standalone): serve one agent without declaring a group of one
Astrasu Sep 16, 2026
a9d9715
Merge main into feature/multi-agent-namespaces
Astrasu Sep 16, 2026
d0d20a4
Merge develop into feature/multi-agent-namespaces
Astrasu Sep 16, 2026
57371ba
fix(config): refuse an agent settings file that names its own agent
Astrasu Sep 16, 2026
0496ce7
docs(changelog): add breaking change 12 for Component.shared_config r…
Sep 17, 2026
9c895be
Merge pull request #98 from bechtleav360/fix/97-shared-config-rename-…
solicho Sep 17, 2026
db2b434
docs(guides): state that a grouped container needs an explicit group
Astrasu Sep 18, 2026
9439fae
Merge origin/feature/multi-agent-namespaces: standalone serving, pack…
Astrasu Sep 18, 2026
419fafe
docs(group): say where the group file lives and how it reaches a cont…
Astrasu Sep 18, 2026
4c3209a
chore(release): 0.9.0a6
Astrasu Sep 18, 2026
07a9895
fix(cli): validate --group resolves agent roots the way the runtime does
Astrasu Sep 18, 2026
44ea31f
chore(release): 0.9.0a7
Astrasu Sep 18, 2026
c45b5c3
docs(migration): one intro, an honest file count, and where the map m…
Astrasu Sep 18, 2026
6bc9d99
fix(docker): probe a health route the application actually serves
Astrasu Sep 18, 2026
32fc186
docs: sweep the pages that still describe the pre-standalone world
Astrasu Sep 18, 2026
6d214c2
chore(release): 0.9.0a8
Astrasu Sep 18, 2026
80f9db0
feat(cli): ship a blueprint-migration skill and list skills from disk…
Astrasu Sep 24, 2026
31375cc
build: set the base version to 0.9.0; release versions come from the tag
Astrasu Sep 24, 2026
159611f
fix(config): keep an environment override when an agent's settings fi…
Astrasu Sep 24, 2026
16472c2
fix(nats): require nats_url outside development, and warn when runnin…
Astrasu Sep 24, 2026
eaefebd
feat(nats): pass credentials and inbox prefix to the connection, and …
Astrasu Sep 24, 2026
49bbf84
feat(nats)!: hand the delivery subject to handlers as context["nats_s…
Astrasu Sep 24, 2026
ec9517b
fix(nats): keep a latched-down agent from subscribing at startup
Astrasu Sep 24, 2026
b486b31
fix(startup): retry a latched agent until it starts, and report the l…
Astrasu Sep 24, 2026
cdb78c4
fix(eventing): fail the delivery when a handler result cannot be publ…
Astrasu Sep 24, 2026
9ffdd3d
fix(nats)!: enforce the declared JetStream mode instead of falling ba…
Astrasu Sep 24, 2026
ddab8d2
fix(handler): claim the dedup marker atomically
Astrasu Sep 24, 2026
46ac4c4
fix(agent): pass the configured result and deps types to the agent
Astrasu Sep 24, 2026
5259e4f
fix(group): build each agent from its own copy of a shared AgentBuilder
Astrasu Sep 24, 2026
191d394
fix(clients): give the vLLM timeout its own key, and send the Dapr ro…
Astrasu Sep 24, 2026
d52d01a
fix(rest): stop logging request bodies, and keep the caller's request id
Astrasu Sep 24, 2026
8147b60
fix(sessions): bound the job handler's replay guard in time and size
Astrasu Sep 24, 2026
9b4560c
fix(generator): scaffold a project that builds, and stop contradictin…
Astrasu Sep 24, 2026
44ffcf2
fix(telemetry)!: record event counters on the agent's own meter, labe…
Astrasu Sep 24, 2026
fb6550b
fix: log each failure once, fix the health status vocabulary, and cor…
Astrasu Sep 24, 2026
54c309a
refactor(models): remove the empty event_routing module and unused ex…
Astrasu Sep 24, 2026
5838aab
fix(logging): restore a standalone agent's pre-namespace log lines
Astrasu Sep 25, 2026
65bf410
fix(config): let a standalone agent read hostname, pod_name and bluep…
Astrasu Sep 25, 2026
3200e12
fix(nats): name a standalone agent's connection after its pod alone
Astrasu Sep 25, 2026
94043c2
fix(actuator): give a standalone agent's readiness and env payloads t…
Astrasu Sep 25, 2026
f6a65ec
fix(nats): make JetStream consumer settings opt-in and reuse 0.8 dura…
Astrasu Sep 25, 2026
71a29fc
fix(telemetry): honour OTEL_RESOURCE_ATTRIBUTES and write no placehol…
Astrasu Sep 25, 2026
c30b0b5
docs: record the remaining breaking changes and the repo's language
Astrasu Sep 25, 2026
e8c0bbe
chore: merge develop (0.8.1 release) into feature/multi-agent-namespaces
Astrasu Sep 25, 2026
134cc6f
feat(cli): warn about absolute src imports in asbs validate --group
Astrasu Sep 28, 2026
6dd1529
feat(api)!: one Swagger group per grouped agent, with reserved path s…
Astrasu Sep 28, 2026
afa2ce7
fix(logging): leave successful health probes out of the access log
Astrasu Oct 9, 2026
a20a2b7
fix(nats): run deliveries concurrently and keep long runs alive
Astrasu Oct 14, 2026
5dd9959
docs(plans): named NATS connections with concurrent runs
Astrasu Oct 14, 2026
c2054ae
refactor(nats): links and bindings inside NATSClient; one run per sub…
Astrasu Oct 14, 2026
fa2e609
feat(nats): binding mode -- consume through a consumer the deployment…
Astrasu Oct 14, 2026
4580953
feat(nats): named connections from a connection source
Astrasu Oct 14, 2026
567d1f5
feat(nats): a guaranteed run per (agent, connection), a process pool …
Astrasu Oct 14, 2026
c30737c
test(integration): wait for a run to be counted out instead of expect…
Astrasu Oct 14, 2026
29dfb77
feat(nats): bound a run with nats_handler_timeout
Astrasu Oct 14, 2026
4aa166f
feat(cli): asbs validate warns about a swallowed asyncio.CancelledError
Astrasu Oct 14, 2026
9a62f7a
Merge origin/develop into feature/multi-agent-namespaces
Astrasu Oct 14, 2026
f99b37d
docs(plans): step 4 follows the dynamic-subscriptions rules and takes…
Astrasu Oct 14, 2026
c8ec35a
fix(nats): a closed connection reconnects and resubscribes; unlimited…
Astrasu Oct 14, 2026
ca1a8eb
feat(nats): named connections change at runtime through ConnectionSou…
Astrasu Oct 15, 2026
44e9038
feat(nats): ConnectionSource.claims keeps tenant subjects off the def…
Astrasu Oct 15, 2026
108ee01
test(integration): delivery features and named connections against a …
Astrasu Oct 15, 2026
d90ca5f
feat(nats): per-connection readiness state and nats_connections_readi…
Astrasu Oct 15, 2026
47a71c1
feat(handler): HandlerResult.skipped for a responsible handler with n…
Astrasu Oct 15, 2026
e3f179d
docs: one main.py pattern, handlers translate and services decide (na…
Astrasu Oct 15, 2026
00f3e59
feat(cli): asbs validate checks the NATS delivery keys before startup…
Astrasu Oct 15, 2026
e7496f0
refactor(examples): main.py is a declaration with create_app(), as th…
Astrasu Oct 15, 2026
c8aee09
docs(plans): step 6 inventory; AgentBuilder reference and the testing…
Astrasu Oct 15, 2026
f72c84a
refactor(examples): webhook_relay -- one handler translates, WebhookS…
Astrasu Oct 15, 2026
1d40fdc
refactor(examples): order_event_pipeline -- one service call per even…
Astrasu Oct 15, 2026
ad771f0
docs(spec): an event no handler takes is logged at WARNING (sec. 7.2)
Astrasu Oct 15, 2026
30f14e7
feat(examples): site_readings -- one agent, two named connections fro…
Astrasu Oct 15, 2026
4cbc3c2
fix(examples): document_summarizer -- no assert in production code
Astrasu Oct 15, 2026
b7586e3
feat(nats): nats_delivery_attempt and nats_max_deliver in the handler…
Astrasu Oct 15, 2026
0b335ae
docs(plans): step 6 inventory -- examples fixed, named-connection exa…
Astrasu Oct 15, 2026
a9e3055
refactor(examples): APIs translate DTOs, services see domain models o…
Astrasu Oct 15, 2026
85f1ea1
refactor(examples): model files use the template's names, dto.py and …
Astrasu Oct 15, 2026
fee86fe
style(docs): end-of-file newline in the component naming plan
Astrasu Oct 15, 2026
851990a
docs(changelog): the examples and site_readings under Unreleased
Astrasu Oct 15, 2026
be15878
docs(plans): condense the feature changelog to decisions and outcomes
Astrasu Oct 15, 2026
7e4764c
fix(dedup,logs): keep the dedup marker only when acknowledged; no pay…
Astrasu Oct 19, 2026
49558b8
chore(naming): generic names for the first consumer's product and sub…
Astrasu Oct 19, 2026
b46efee
fix(dedup): key the dedup marker on the named connection too
Astrasu Oct 19, 2026
f2d9932
fix(nats): a JetStream reconnect re-checks broker state instead of re…
Astrasu Oct 19, 2026
43f808e
fix(supervisor): retry a failed resume; pause and resume SessionsBus too
Astrasu Oct 19, 2026
f920e17
fix(nats): named bindings -- retire superseded ones, never read a ref…
Astrasu Oct 19, 2026
871fd7a
fix(group): refuse scalar lists, duplicate groups, unknown critical a…
Astrasu Oct 19, 2026
2532b9a
fix(config): merge each agent's secrets, layer fragments for the load…
Astrasu Oct 19, 2026
d3858d4
fix(registry): ownership checks on views; look into bound methods and…
Astrasu Oct 19, 2026
b99d75b
fix(scheduler): a grouped tick handler belongs to its agent; subject …
Astrasu Oct 19, 2026
c05b740
fix(scheduler): crontab checked per mode, timezone, one gauge per met…
Astrasu Oct 19, 2026
a10fc7d
fix(cache): a Redis clear or listing touches only the cache's own keys
Astrasu Oct 19, 2026
a7a3c1d
fix(actuator): /status/env masking fails closed
Astrasu Oct 19, 2026
b4abbbe
fix(scaffold): select production, Python healthcheck, CLI messages an…
Astrasu Oct 19, 2026
4939cab
fix(dedup): cache calls off the event loop; redis-py >= 8; warn witho…
Astrasu Oct 19, 2026
d139c5e
fix(dapr): a copy of the event per agent, a bounded topic label, the …
Astrasu Oct 19, 2026
44d7d92
fix(telemetry): the shared exporter is closed by the last provider; a…
Astrasu Oct 19, 2026
3c7160e
fix(nats): refuse a durable that filters another subject; free the ru…
Astrasu Oct 19, 2026
823491f
fix(standalone): 0.8 shapes build again; event_loop_debug off unless …
Astrasu Oct 19, 2026
88bb8cf
fix: the resolved group is the deployment group; diskcache-rs >= 0.4.…
Astrasu Oct 19, 2026
904ecac
docs(release): fold [0.9.0] into [Unreleased], version back to 0.8.2,…
Astrasu Oct 19, 2026
a05b1b2
fix: findings of the final container run
Astrasu Oct 19, 2026
665c912
test(design-rules): prune ignored directories instead of walking .venv
Astrasu Oct 20, 2026
7aa7758
fix(dedup): a "false" heartbeat from the environment warns; runtime d…
Astrasu Oct 20, 2026
1d877f2
fix(validate): read settings the way the runtime does; generator and …
Astrasu Oct 20, 2026
b032f0f
docs: docs, skills and the grouping spec match the code after the rev…
Astrasu Oct 20, 2026
4c10274
docs(plan): the PR #96 review-fix plan and its records
Astrasu Oct 20, 2026
33fb329
fix: faults no retry can fix fail early; orphaned agents are unhealth…
Astrasu Oct 20, 2026
17f4033
fix: findings of the first consumer's test report on 0.9.0a16 (B1-B4)
Astrasu Oct 20, 2026
c902df1
docs(plans): name the rewritten commits; D1 revised to a history rewrite
Astrasu Oct 21, 2026
af09ac0
Merge origin/develop (#108) into feature/multi-agent-namespaces
Astrasu Oct 22, 2026
5321192
fix(claude): the push guard reads quoted and multi-line repository paths
Astrasu Oct 22, 2026
1de7dcd
docs(changelog): Breaking 18-21 in order; the upgrade notes name nats…
Astrasu Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 11 additions & 6 deletions .claude/hooks/replaced-history-guard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,23 @@ REPLACED_ROOT=1c2098c131ea654c850dccd2c7c627dab2e26f4a

input=$(cat)

# One shell word in the JSON input: bare, in single quotes, or in double quotes (JSON-escaped:
# \"...\"). Quoted, it may contain spaces, and it is taken whole.
word='(\\"[^"]*\\"|'\''[^'\'']*'\''|[^[:space:];&|"'\''\\][^[:space:];&|"'\'']*)'

# `git push`, also after global options (`git -C dir push`, `git -c k=v push`).
printf '%s' "$input" |
grep -Eq 'git(([[:space:]]+-[Cc][[:space:]]+[^[:space:]]+)|([[:space:]]+--?[A-Za-z][-A-Za-z]*(=[^[:space:]]+)?))*[[:space:]]+push([[:space:]]|$|["'\'';&|)])' ||
grep -Eq 'git(([[:space:]]+-[Cc][[:space:]]+('"$word"'|[^[:space:]]+))|([[:space:]]+--?[A-Za-z][-A-Za-z]*(=[^[:space:]]+)?))*[[:space:]]+push([[:space:]]|$|["'\'';&|)])' ||
exit 0

root=$(cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null && pwd -P) || exit 0

# The repository: `git -C <dir>`, else a leading `cd <dir>`, else the project. JSON-escaped
# backslashes (Windows paths) become slashes; paths with spaces are not recognised (-> the project).
dir=$(printf '%s' "$input" | grep -Eo 'git[[:space:]]+-C[[:space:]]+[^[:space:];&|]+' | head -n 1 | sed -E 's/^git[[:space:]]+-C[[:space:]]+//')
[ -n "$dir" ] || dir=$(printf '%s' "$input" | grep -Eo '"command":[[:space:]]*"cd[[:space:]]+[^[:space:];&|]+' | head -n 1 | sed -E 's/^"command":[[:space:]]*"cd[[:space:]]+//')
dir=$(printf '%s' "$dir" | sed 's#\\\\#/#g' | tr -d '"'\')
# The repository: `git -C <dir>`, else a leading `cd <dir>`, else the project. A path that does not
# resolve is let through below, so a quoted one must be taken whole, quotes and all, then unquoted.
# JSON-escaped backslashes (Windows paths) become slashes; a line break ends a bare path.
dir=$(printf '%s' "$input" | grep -Eo "git[[:space:]]+-C[[:space:]]+$word" | head -n 1 | sed -E 's/^git[[:space:]]+-C[[:space:]]+//')
[ -n "$dir" ] || dir=$(printf '%s' "$input" | grep -Eo "\"command\":[[:space:]]*\"cd[[:space:]]+$word" | head -n 1 | sed -E 's/^"command":[[:space:]]*"cd[[:space:]]+//')
dir=$(printf '%s' "$dir" | sed -e 's/^\\"\(.*\)\\"$/\1/' -e "s/^'\(.*\)'\$/\1/" -e 's#\\\\#/#g' -e 's/\\n.*//')
if [ -n "$dir" ]; then
dir=$(cd "$dir" 2>/dev/null && pwd -P) || exit 0
case "$dir/" in
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ cython_debug/
custom/dapr/components/rabbitmq-pubsub.yaml

# Secrets
# Both names: the framework loads '.secrets.toml' (DEFAULT_SETTINGS_FILES) and asbs
# scaffolds that name, while 'secrets.toml' is the older name still found in the wild.
# Named exactly rather than '.secrets.*', which would also hide the committed example.
**/secrets.toml
**/.secrets.toml
.env.rabbitmq
uv.lock

Expand All @@ -160,3 +164,6 @@ uv.lock


ARCHITECTURE_DECISIONS.md

# Private, machine-local Claude Code instructions
CLAUDE.local.md
276 changes: 276 additions & 0 deletions AGENTS.md

Large diffs are not rendered by default.

1,011 changes: 1,010 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

93 changes: 89 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,39 @@

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

See `AGENTS.md` for architecture, component patterns, and testing conventions shared across all AI assistants.
See `AGENTS.md` for the architecture, the component patterns, the testing conventions and the **design rules** --
each with the failure it prevents -- shared across all AI assistants and every human working here.

## Language

This repository is written entirely in English: code, identifiers, comments, docstrings, log and error messages,
documentation, specs, plans, changelogs, commit messages and pull-request descriptions.

## Dev Commands

```bash
# Install in editable mode with dev deps
uv pip install -e ".[dev]"

# Run all tests (bare pytest not in PATH — always use uv run)
# Run everything CI runs: tests/unit needs nothing running (bare pytest is not in PATH)
uv run pytest tests/unit

# Everything, including tests/integration, which needs the services it names
uv run pytest tests/

# Skip integration tests (no external services needed)
# Everything that needs no external service. tests/integration is marked by location
# (tests/integration/conftest.py), so this deselects the whole directory rather than the
# three tests that happened to carry the decorator.
uv run pytest tests/ -m "not integration"

# Only the tests that need services running
uv run pytest tests/ -m integration

# Run a single test
uv run pytest tests/unit/agents/app_builder/test_app_builder.py::TestClass::test_name -v

# Run tests with coverage
uv run pytest tests/ --cov=blueprint.agents --cov-report=html
uv run pytest tests/unit --cov=blueprint.agents --cov-report=html

# Lint / format / type-check
ruff check src/ tests/
Expand Down Expand Up @@ -63,6 +77,77 @@ cp dist/* ~/local-pypi/
uv pip install --no-cache-dir --find-links file:///home/pajoma/pypi/ avs-blueprint-agents==<version>
```

---

## Multi-Agent Grouping

- **Spec (normative):** `docs/specs/2026-08-28-multi-agent-grouping.md` -- invariants C1-C7, API
surface, config reference, acceptance criteria. Where any other document disagrees with the
spec, the spec wins.
- **Implementation plan:** `docs/plans/2026-08-28-multi-agent-grouping.md` -- prerequisites P0-P6
(blocking defects) and phases 0-10.
- **Follow-up plan -- grouped HTTP surface:** `docs/plans/2026-09-28-grouped-http-surface.md` --
one Swagger tag per agent, reserved path segments (`nats`, `cache`, `scheduler`), steps 0-4.
Spec sec. 11.2. Standalone tags and paths never change.

**Work this feature in reviewable steps.** Make one change, then stop and report what changed and
why before starting the next. Do not chain phases together, and do not chain the work items within
a phase, into a single unreviewed run -- each step is meant to be looked at before the next one
begins. This rule applies to every prerequisite and phase in that plan, and only to this feature.

**Record every change in the feature changelog.** `docs/plans/2026-08-28-multi-agent-grouping-changelog.md`
is updated as part of each change, not reconstructed at the end: it is the running record of what
was done and why, and it becomes the pull-request description. Smaller fixes found along the way
belong in it too -- they are the ones most easily lost.

**Explain new code, not just its arrival.** When a change introduces real implementation -- new
behaviour, new control flow, a new abstraction -- report what was built and how it works, not only
which files changed and whether the checks passed. Formatting and lint fixes, type annotations,
tests and documentation need no walkthrough.

**Report the production code in detail, and report it first.** The walkthrough is about
`src/`: name each function, branch and call site that changed, show the lines that matter, and say
what the code now does that it did not do before and what breaks if it is removed. A list of files
touched, a summary of intent, or "tests pass and lint is clean" is not a report of the code -- that
is the wrapper around it. Tests, documentation and the changelog are listed, not walked through:
they are how the change is verified and recorded, not the change itself.

This is not satisfied by having reported the code in an earlier message. **Every message that
reports a step as done carries the walkthrough**, including the one that follows a background test
run finishing -- that message reports the step, so it repeats the code detail rather than shrinking
to a status line. Err towards showing the actual changed lines: a paraphrase of what a function now
does is weaker than the function.

The rule has been missed repeatedly, so treat it as a checklist item before writing any completion
message: *have I shown the changed code, not described it?*

Read the spec before changing `component/registry.py`, `app_builder.py`, `handler/`,
`services/eventing/`, `io/api/eventing/`, `clients/io/nats_client.py`, the schedulers or
telemetry: those paths carry invariants that are not visible from the code.

---

## Commits

Commit messages follow **Conventional Commits** -- `.pre-commit-config.yaml` runs the commitizen
hook at the `commit-msg` stage, so the subject line must be `<type>(<scope>): <description>` with
a type from `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`,
`revert`. A prefix like `P0:` is not a type and will be rejected once the hook is installed.

Install every hook stage, not just the default one:

```bash
pre-commit install
pre-commit install --hook-type commit-msg
pre-commit install --hook-type pre-push
```

End every commit message with the repo's trailer:

```
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
```

## Project names

This repository is public and used by many projects. The names of projects, products, customers,
Expand Down
37 changes: 29 additions & 8 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,24 @@ This installs:
### Run All Tests

```bash
python pytest tests/
python -m pytest tests/
```

### Run Tests with Coverage

`--cov` comes from `pytest-cov`, which no extra of this package installs:

```bash
python pytest tests/ --cov=blueprint.agents --cov-report=html
pip install pytest-cov
python -m pytest tests/ --cov=blueprint.agents --cov-report=html
```

This generates an HTML coverage report in `htmlcov/index.html`.

### Run Tests for a Specific Module

```bash
python pytest tests/unit/test_agent_builder.py
python -m pytest tests/unit/agents/agent/test_agent_builder.py
```

### Run Tests in Watch Mode (with pytest-watch)
Expand All @@ -96,7 +99,7 @@ pytest tests/ -v
### Run a Specific Test

```bash
pytest tests/unit/test_agent_builder.py::TestAgentBuilder::test_with_model_sets_model_name -v
pytest tests/unit/agents/agent/test_agent_builder.py::TestFluentSetters::test_with_tool_appends -v
```

## Building the Package Locally
Expand Down Expand Up @@ -142,7 +145,7 @@ You should see entries like:
blueprint/agents/__init__.py
blueprint/agents/agent/__init__.py
blueprint/agents/agent/agent_builder.py
blueprint/agents/api/__init__.py
blueprint/agents/app_builder.py
blueprint/agents/config/__init__.py
...
```
Expand Down Expand Up @@ -206,16 +209,34 @@ mypy src/
black src/ tests/ && ruff check src/ tests/ && mypy src/
```

## Pre-commit & Pre-push Hooks
## Commit Messages

Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/): a subject line
of `<type>(<scope>): <description>`, where the type is one of `feat`, `fix`, `docs`, `style`,
`refactor`, `perf`, `test`, `build`, `ci`, `chore` or `revert`. The commitizen hook configured in
`.pre-commit-config.yaml` checks this at the `commit-msg` stage, so it only runs if you install
that stage (see below).

```
fix(eventing): join a queue group on Core NATS subscriptions

Without queue= every replica received every message, so two replicas
doubled every side effect.
```

## Pre-commit, Commit-msg & Pre-push Hooks

Set up both commit and push hooks:
Install all three hook stages -- `pre-commit install` on its own installs only the first, which
leaves the commit-message check inactive:

```bash
pre-commit install
pre-commit install --hook-type commit-msg
pre-commit install --hook-type pre-push
```

- **Pre-commit** runs linting and formatting checks on staged files before each commit.
- **Commit-msg** validates the commit message against Conventional Commits.
- **Pre-push** runs the unit test suite before pushing, so CI won't fail on basic issues.

## Troubleshooting
Expand Down Expand Up @@ -270,7 +291,7 @@ Publishing is handled by the CI/CD pipeline. See `.github/workflows/publish.yml`

If you encounter issues, please:

1. Check the [Troubleshooting Guide](docs/guides/troubleshooting.md) for known issues
1. Check the [Troubleshooting Guide](src/blueprint/agent_generator/docs/guides/troubleshooting.md) for known issues
2. Review the test output carefully for error messages
3. Open an issue on GitHub with details about your environment and the error

Expand Down
Loading
Loading