autobuild-factory 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autobuild_factory-0.2.2/.gitattributes +11 -0
- autobuild_factory-0.2.2/.github/workflows/release.yml +79 -0
- autobuild_factory-0.2.2/.gitignore +30 -0
- autobuild_factory-0.2.2/LICENSE +21 -0
- autobuild_factory-0.2.2/PKG-INFO +79 -0
- autobuild_factory-0.2.2/README.md +47 -0
- autobuild_factory-0.2.2/docs/architecture.md +272 -0
- autobuild_factory-0.2.2/docs/harness-adapters.md +92 -0
- autobuild_factory-0.2.2/docs/running-autobuild.md +609 -0
- autobuild_factory-0.2.2/pyproject.toml +30 -0
- autobuild_factory-0.2.2/skills/autobuild/SKILL.md +33 -0
- autobuild_factory-0.2.2/skills/autobuild-plan/SKILL.md +65 -0
- autobuild_factory-0.2.2/src/autobuild/__init__.py +12 -0
- autobuild_factory-0.2.2/src/autobuild/__main__.py +6 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/__init__.py +26 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/backlog_tracker.py +335 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/claude_harness.py +99 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/codex_harness.py +63 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/copilot_harness.py +112 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/git_workspace.py +338 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/harness_cli.py +378 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/koine_knowledge.py +104 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/local_command.py +167 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/local_records.py +82 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/no_refill_knowledge.py +23 -0
- autobuild_factory-0.2.2/src/autobuild/adapters/pinax_tracker.py +290 -0
- autobuild_factory-0.2.2/src/autobuild/application/__init__.py +8 -0
- autobuild_factory-0.2.2/src/autobuild/application/campaign.py +61 -0
- autobuild_factory-0.2.2/src/autobuild/application/dependencies.py +15 -0
- autobuild_factory-0.2.2/src/autobuild/application/item.py +349 -0
- autobuild_factory-0.2.2/src/autobuild/application/prompts.py +59 -0
- autobuild_factory-0.2.2/src/autobuild/application/state_machine.py +38 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/__init__.py +16 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/builtins.py +70 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/composition.py +277 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/environment.py +18 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/profile.py +342 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/registry.py +80 -0
- autobuild_factory-0.2.2/src/autobuild/bootstrap/runtime.py +135 -0
- autobuild_factory-0.2.2/src/autobuild/cli.py +82 -0
- autobuild_factory-0.2.2/src/autobuild/domain/__init__.py +105 -0
- autobuild_factory-0.2.2/src/autobuild/domain/errors.py +29 -0
- autobuild_factory-0.2.2/src/autobuild/domain/models.py +423 -0
- autobuild_factory-0.2.2/src/autobuild/enforcement/__init__.py +5 -0
- autobuild_factory-0.2.2/src/autobuild/enforcement/policy.py +386 -0
- autobuild_factory-0.2.2/src/autobuild/ports/__init__.py +19 -0
- autobuild_factory-0.2.2/src/autobuild/ports/contracts.py +88 -0
- autobuild_factory-0.2.2/src/autobuild/testing/__init__.py +21 -0
- autobuild_factory-0.2.2/src/autobuild/testing/fakes.py +184 -0
- autobuild_factory-0.2.2/tests/architecture/test_dependency_direction.py +55 -0
- autobuild_factory-0.2.2/tests/architecture/test_entry_shim.py +32 -0
- autobuild_factory-0.2.2/tests/architecture/test_public_documentation.py +166 -0
- autobuild_factory-0.2.2/tests/contract/test_adapter_registry.py +59 -0
- autobuild_factory-0.2.2/tests/contract/test_harness_adapters.py +310 -0
- autobuild_factory-0.2.2/tests/integration/test_backlog_tracker.py +145 -0
- autobuild_factory-0.2.2/tests/integration/test_git_workspace.py +104 -0
- autobuild_factory-0.2.2/tests/integration/test_local_adapters.py +174 -0
- autobuild_factory-0.2.2/tests/integration/test_pinax_tracker.py +200 -0
- autobuild_factory-0.2.2/tests/test_smoke.py +2 -0
- autobuild_factory-0.2.2/tests/unit/test_cli.py +175 -0
- autobuild_factory-0.2.2/tests/unit/test_enforcement.py +228 -0
- autobuild_factory-0.2.2/tests/unit/test_runtime_binding.py +65 -0
- autobuild_factory-0.2.2/tests/unit/test_workflows.py +273 -0
- autobuild_factory-0.2.2/uv.lock +79 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# LF everywhere; union merge on the tracker's event log.
|
|
2
|
+
* text=auto eol=lf
|
|
3
|
+
*.jsonl text eol=lf merge=union
|
|
4
|
+
.ergon/** text eol=lf
|
|
5
|
+
*.py text eol=lf
|
|
6
|
+
*.md text eol=lf
|
|
7
|
+
*.js text eol=lf
|
|
8
|
+
*.mjs text eol=lf
|
|
9
|
+
*.sh text eol=lf
|
|
10
|
+
*.toml text eol=lf
|
|
11
|
+
*.json text eol=lf
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Publish release assets to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
release_tag:
|
|
7
|
+
description: GitHub release tag containing the reviewed package artifacts
|
|
8
|
+
required: true
|
|
9
|
+
default: autobuild-factory-0.2.2
|
|
10
|
+
type: string
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: pypi-publish
|
|
14
|
+
cancel-in-progress: false
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
publish:
|
|
21
|
+
name: Publish to PyPI
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
environment:
|
|
24
|
+
name: pypi
|
|
25
|
+
url: https://pypi.org/project/autobuild-factory/
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
id-token: write
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Download the GitHub release assets
|
|
32
|
+
env:
|
|
33
|
+
GH_TOKEN: ${{ github.token }}
|
|
34
|
+
RELEASE_TAG: ${{ inputs.release_tag }}
|
|
35
|
+
REPOSITORY: ${{ github.repository }}
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
case "$RELEASE_TAG" in
|
|
40
|
+
autobuild-factory-[0-9]*.[0-9]*.[0-9]*) ;;
|
|
41
|
+
*)
|
|
42
|
+
echo "release_tag must use the form autobuild-factory-X.Y.Z" >&2
|
|
43
|
+
exit 1
|
|
44
|
+
;;
|
|
45
|
+
esac
|
|
46
|
+
|
|
47
|
+
mkdir -p release-assets dist
|
|
48
|
+
gh release download "$RELEASE_TAG" \
|
|
49
|
+
--repo "$REPOSITORY" \
|
|
50
|
+
--dir release-assets \
|
|
51
|
+
--pattern "autobuild_factory-*.whl" \
|
|
52
|
+
--pattern "autobuild_factory-*.tar.gz" \
|
|
53
|
+
--pattern "SHA256SUMS"
|
|
54
|
+
|
|
55
|
+
- name: Verify the release assets
|
|
56
|
+
shell: bash
|
|
57
|
+
run: |
|
|
58
|
+
set -euo pipefail
|
|
59
|
+
cd release-assets
|
|
60
|
+
|
|
61
|
+
test -f SHA256SUMS
|
|
62
|
+
mapfile -t packages < <(
|
|
63
|
+
find . -maxdepth 1 -type f \
|
|
64
|
+
\( -name "autobuild_factory-*.whl" -o -name "autobuild_factory-*.tar.gz" \) \
|
|
65
|
+
-printf "%f\n" | sort
|
|
66
|
+
)
|
|
67
|
+
test "${#packages[@]}" -eq 2
|
|
68
|
+
sha256sum --check --strict SHA256SUMS
|
|
69
|
+
|
|
70
|
+
cp -- "${packages[@]}" ../dist/
|
|
71
|
+
|
|
72
|
+
- name: Publish the verified distributions
|
|
73
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
74
|
+
with:
|
|
75
|
+
packages-dir: dist
|
|
76
|
+
verify-metadata: true
|
|
77
|
+
skip-existing: false
|
|
78
|
+
attestations: true
|
|
79
|
+
print-hash: true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
.venv/
|
|
7
|
+
venv/
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
htmlcov/
|
|
13
|
+
dist/
|
|
14
|
+
build/
|
|
15
|
+
.uv/
|
|
16
|
+
|
|
17
|
+
# Runtime and scratch
|
|
18
|
+
.autobuild-run/
|
|
19
|
+
*.log
|
|
20
|
+
/tmp/
|
|
21
|
+
_norton_/
|
|
22
|
+
|
|
23
|
+
# OS / editor
|
|
24
|
+
.DS_Store
|
|
25
|
+
Thumbs.db
|
|
26
|
+
|
|
27
|
+
# Local tool settings
|
|
28
|
+
.claude/settings.local.json
|
|
29
|
+
.claude/*.lock
|
|
30
|
+
.claude/worktrees/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Georgios Antikatzidis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: autobuild-factory
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: The software factory's build cycle, harness-neutral: logic once, mechanisms behind adapters.
|
|
5
|
+
Project-URL: Repository, https://github.com/antikas/autobuild-factory
|
|
6
|
+
Project-URL: Issues, https://github.com/antikas/autobuild-factory/issues
|
|
7
|
+
Author: Georgios Antikatzidis
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Georgios Antikatzidis
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Python: >=3.11
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# AutoBuild
|
|
34
|
+
|
|
35
|
+
Coding assistants can work through a backlog, but the result becomes hard to trust when each assistant carries a different build process in its prompt. AutoBuild puts the campaign in one Python application so the same sequence, checks and delivery rules apply whichever supported assistant runs it.
|
|
36
|
+
|
|
37
|
+
A fresh builder changes one ready item from the project's tracked queue in an isolated Git worktree. The queue can be [Pinax](https://github.com/antikas/pinax-tracker) or a supported `BACKLOG.md` table. A fresh reviewer sees the approved request, changed files and test evidence without the builder transcript. The application accepts, parks or stops the item, then records enough evidence to judge the outcome without reconstructing a chat session.
|
|
38
|
+
|
|
39
|
+
The workflow is harness-neutral. Claude Code, Codex and GitHub Copilot sit behind adapters selected at startup; the campaign sequence does not change with the assistant, operating system or shell.
|
|
40
|
+
|
|
41
|
+
## Run sequence
|
|
42
|
+
|
|
43
|
+
1. Check the selected harness, repository and project test command before claiming work.
|
|
44
|
+
2. Build and review one ready item in an isolated worktree.
|
|
45
|
+
3. Deliver accepted product and tracker commits to the remote default branch.
|
|
46
|
+
4. Continue until the queue is dry, the item limit is reached or required evidence fails.
|
|
47
|
+
|
|
48
|
+
## Repository contents
|
|
49
|
+
|
|
50
|
+
- `src/autobuild/`: the cycle and its adapter interfaces
|
|
51
|
+
- `src/autobuild/adapters/`: the adapters, one per mechanism
|
|
52
|
+
- `src/autobuild/enforcement/`: gates, validators and schemas
|
|
53
|
+
- `skills/autobuild-plan/`: plans, reviews and registers an end-to-end queue, then stops before launch
|
|
54
|
+
- `skills/autobuild/`: configures and launches the Python workflow against a ready queue
|
|
55
|
+
- `tests/`: the test lane
|
|
56
|
+
|
|
57
|
+
## Start here
|
|
58
|
+
|
|
59
|
+
The [setup and run guide](docs/running-autobuild.md) explains installation, harness authentication, item briefs, Pinax and `BACKLOG.md`, the project profile, campaign results, refill and failure handling from a standing start.
|
|
60
|
+
|
|
61
|
+
AutoBuild has two stages. Use `autobuild-plan` for research, planning, independent review and tracker registration. After the owner approves that result, use `autobuild` to run the queue. [The operating guide starts with the planning stage](docs/running-autobuild.md#stage-1-plan-and-register-the-work).
|
|
62
|
+
|
|
63
|
+
Release 0.2.2 is available from PyPI as [`autobuild-factory`](https://pypi.org/project/autobuild-factory/) and as a Python wheel and source archive on the [GitHub release page](https://github.com/antikas/autobuild-factory/releases/tag/v0.2.2). The guide also has a [macOS setup path](docs/running-autobuild.md#set-up-autobuild-on-macos) and [GitHub Copilot setup](docs/running-autobuild.md#github-copilot-cli).
|
|
64
|
+
|
|
65
|
+
Platform and coding assistant are separate choices. You can use Codex on macOS, GitHub Copilot on Windows, or any other supported combination.
|
|
66
|
+
|
|
67
|
+
The [architecture guide](docs/architecture.md) explains the layers, state machines, ports, adapters, evidence chain, Git delivery model and extension points.
|
|
68
|
+
|
|
69
|
+
Run the test lane with `uv run --native-tls python -m pytest tests -q`.
|
|
70
|
+
|
|
71
|
+
The [harness adapter guide](docs/harness-adapters.md) explains how one builder and reviewer contract runs through Claude Code, Codex and GitHub Copilot.
|
|
72
|
+
|
|
73
|
+
## Delivery checks
|
|
74
|
+
|
|
75
|
+
AutoBuild probes its adapters before claiming work, confines changes to an isolated worktree, runs only the declared validator and verifies the remote revision after delivery. An accepted result must carry matching diff, validator, review, product-commit and tracker-commit evidence.
|
|
76
|
+
|
|
77
|
+
## Scope and limits
|
|
78
|
+
|
|
79
|
+
Product decisions, public releases and production deployments stay outside AutoBuild. An optional queue-refill plan records proposed work and unresolved questions. It cannot make a proposal runnable.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# AutoBuild
|
|
2
|
+
|
|
3
|
+
Coding assistants can work through a backlog, but the result becomes hard to trust when each assistant carries a different build process in its prompt. AutoBuild puts the campaign in one Python application so the same sequence, checks and delivery rules apply whichever supported assistant runs it.
|
|
4
|
+
|
|
5
|
+
A fresh builder changes one ready item from the project's tracked queue in an isolated Git worktree. The queue can be [Pinax](https://github.com/antikas/pinax-tracker) or a supported `BACKLOG.md` table. A fresh reviewer sees the approved request, changed files and test evidence without the builder transcript. The application accepts, parks or stops the item, then records enough evidence to judge the outcome without reconstructing a chat session.
|
|
6
|
+
|
|
7
|
+
The workflow is harness-neutral. Claude Code, Codex and GitHub Copilot sit behind adapters selected at startup; the campaign sequence does not change with the assistant, operating system or shell.
|
|
8
|
+
|
|
9
|
+
## Run sequence
|
|
10
|
+
|
|
11
|
+
1. Check the selected harness, repository and project test command before claiming work.
|
|
12
|
+
2. Build and review one ready item in an isolated worktree.
|
|
13
|
+
3. Deliver accepted product and tracker commits to the remote default branch.
|
|
14
|
+
4. Continue until the queue is dry, the item limit is reached or required evidence fails.
|
|
15
|
+
|
|
16
|
+
## Repository contents
|
|
17
|
+
|
|
18
|
+
- `src/autobuild/`: the cycle and its adapter interfaces
|
|
19
|
+
- `src/autobuild/adapters/`: the adapters, one per mechanism
|
|
20
|
+
- `src/autobuild/enforcement/`: gates, validators and schemas
|
|
21
|
+
- `skills/autobuild-plan/`: plans, reviews and registers an end-to-end queue, then stops before launch
|
|
22
|
+
- `skills/autobuild/`: configures and launches the Python workflow against a ready queue
|
|
23
|
+
- `tests/`: the test lane
|
|
24
|
+
|
|
25
|
+
## Start here
|
|
26
|
+
|
|
27
|
+
The [setup and run guide](docs/running-autobuild.md) explains installation, harness authentication, item briefs, Pinax and `BACKLOG.md`, the project profile, campaign results, refill and failure handling from a standing start.
|
|
28
|
+
|
|
29
|
+
AutoBuild has two stages. Use `autobuild-plan` for research, planning, independent review and tracker registration. After the owner approves that result, use `autobuild` to run the queue. [The operating guide starts with the planning stage](docs/running-autobuild.md#stage-1-plan-and-register-the-work).
|
|
30
|
+
|
|
31
|
+
Release 0.2.2 is available from PyPI as [`autobuild-factory`](https://pypi.org/project/autobuild-factory/) and as a Python wheel and source archive on the [GitHub release page](https://github.com/antikas/autobuild-factory/releases/tag/v0.2.2). The guide also has a [macOS setup path](docs/running-autobuild.md#set-up-autobuild-on-macos) and [GitHub Copilot setup](docs/running-autobuild.md#github-copilot-cli).
|
|
32
|
+
|
|
33
|
+
Platform and coding assistant are separate choices. You can use Codex on macOS, GitHub Copilot on Windows, or any other supported combination.
|
|
34
|
+
|
|
35
|
+
The [architecture guide](docs/architecture.md) explains the layers, state machines, ports, adapters, evidence chain, Git delivery model and extension points.
|
|
36
|
+
|
|
37
|
+
Run the test lane with `uv run --native-tls python -m pytest tests -q`.
|
|
38
|
+
|
|
39
|
+
The [harness adapter guide](docs/harness-adapters.md) explains how one builder and reviewer contract runs through Claude Code, Codex and GitHub Copilot.
|
|
40
|
+
|
|
41
|
+
## Delivery checks
|
|
42
|
+
|
|
43
|
+
AutoBuild probes its adapters before claiming work, confines changes to an isolated worktree, runs only the declared validator and verifies the remote revision after delivery. An accepted result must carry matching diff, validator, review, product-commit and tracker-commit evidence.
|
|
44
|
+
|
|
45
|
+
## Scope and limits
|
|
46
|
+
|
|
47
|
+
Product decisions, public releases and production deployments stay outside AutoBuild. An optional queue-refill plan records proposed work and unresolved questions. It cannot make a proposal runnable.
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# AutoBuild architecture
|
|
2
|
+
|
|
3
|
+
This guide explains how AutoBuild keeps one build process across different coding assistants, operating systems, and trackers. It is written for readers who want to inspect, extend, or review the implementation.
|
|
4
|
+
|
|
5
|
+
The [setup and run guide](running-autobuild.md) covers installation and operation.
|
|
6
|
+
|
|
7
|
+
## Design goal
|
|
8
|
+
|
|
9
|
+
AutoBuild has one campaign sequence and one item sequence. External mechanisms sit behind typed Python interfaces called ports. Adapters implement those ports for Git, trackers, operating systems, and coding assistant commands.
|
|
10
|
+
|
|
11
|
+
The application decides what happens next. The policy layer decides whether an action is allowed. An adapter decides how to perform an allowed action.
|
|
12
|
+
|
|
13
|
+
This split keeps harness flags, shell quoting, tracker commands, and host process rules out of the workflow.
|
|
14
|
+
|
|
15
|
+
## Dependency direction
|
|
16
|
+
|
|
17
|
+
```mermaid
|
|
18
|
+
flowchart TD
|
|
19
|
+
CLI[CLI] --> Bootstrap[Bootstrap and runtime composition]
|
|
20
|
+
Bootstrap --> Application[Campaign and item workflows]
|
|
21
|
+
Bootstrap --> Policy[Policy gateway]
|
|
22
|
+
Bootstrap --> Adapters[Mechanism adapters]
|
|
23
|
+
Application --> Domain[Domain types and state]
|
|
24
|
+
Application --> Ports[Typed ports]
|
|
25
|
+
Policy --> Domain
|
|
26
|
+
Policy --> Ports
|
|
27
|
+
Adapters --> Domain
|
|
28
|
+
Adapters --> Ports
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Dependencies point toward domain types and port contracts. The application layer does not import an adapter, a vendor package, `subprocess`, or platform detection.
|
|
32
|
+
|
|
33
|
+
The bootstrap package is the composition root. It is the only part that selects concrete adapters and knows which host command implementation is active.
|
|
34
|
+
|
|
35
|
+
## Package map
|
|
36
|
+
|
|
37
|
+
| Path | Responsibility |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `src/autobuild/domain/` | Immutable requests, results, states, dispositions, and evidence types |
|
|
40
|
+
| `src/autobuild/ports/` | Protocols for each external boundary |
|
|
41
|
+
| `src/autobuild/application/` | Campaign loop, item workflow, prompts, and state transitions |
|
|
42
|
+
| `src/autobuild/enforcement/` | Deterministic policy checks around port calls |
|
|
43
|
+
| `src/autobuild/adapters/` | Git, tracker, harness, process, record, and knowledge mechanisms |
|
|
44
|
+
| `src/autobuild/bootstrap/` | Profile loading, discovery, adapter selection, and composition |
|
|
45
|
+
| `src/autobuild/cli.py` | Thin command-line entry point |
|
|
46
|
+
| `skills/autobuild-plan/` | Optional planning entry that researches, reviews and registers a queue, then stops before execution |
|
|
47
|
+
| `skills/autobuild/` | Optional execution entry that configures and launches the Python command |
|
|
48
|
+
| `tests/architecture/` | Dependency and entry-shim tripwires |
|
|
49
|
+
| `tests/contract/` | Shared adapter registration and result contracts |
|
|
50
|
+
| `tests/unit/` | Workflow and policy decisions against fakes |
|
|
51
|
+
| `tests/integration/` | Real processes, Git repositories, trackers, and delivery paths |
|
|
52
|
+
|
|
53
|
+
## Entry skills and executable
|
|
54
|
+
|
|
55
|
+
The Python application is the sequencing source. The `autobuild` skill supplies project facts to the command and launches it. The skill does not implement a second campaign or item workflow.
|
|
56
|
+
|
|
57
|
+
The `autobuild-plan` skill sits before execution. It researches the requested outcome, writes and reviews an end-to-end plan, and registers the resulting queue. It stops before launch unless the owner has already authorised execution.
|
|
58
|
+
|
|
59
|
+
The repository and source archive contain both skills. The wheel contains the Python application and its `autobuild` command. Skill installation remains with the coding assistant because each host owns its skill directory and loading rules.
|
|
60
|
+
|
|
61
|
+
## Runtime composition
|
|
62
|
+
|
|
63
|
+
The CLI loads `.autobuild.toml` and applies explicit command-line overrides. Bootstrap then performs these steps:
|
|
64
|
+
|
|
65
|
+
1. Choose the Windows or POSIX command adapter from the current Python host.
|
|
66
|
+
2. Select [Pinax](https://github.com/antikas/pinax-tracker) or the Markdown backlog adapter from `[tracker]` and startup probes.
|
|
67
|
+
3. Configure the Git workspace adapter with the selected tracker's paths.
|
|
68
|
+
4. Resolve the selected harness through the adapter registry.
|
|
69
|
+
5. Choose the no-refill or Koine knowledge adapter from the refill plan.
|
|
70
|
+
6. Probe every selected adapter before a claim.
|
|
71
|
+
7. Record adapter identities and versions in the run manifest.
|
|
72
|
+
8. Wrap the adapters with policy-enforced port implementations.
|
|
73
|
+
9. Start the campaign runner with one immutable `WorkflowPorts` object.
|
|
74
|
+
|
|
75
|
+
Explicit tracker and harness settings take precedence over discovery. Auto tracker selection prefers Pinax when it is usable, then checks the supported backlog path.
|
|
76
|
+
|
|
77
|
+
## Port contracts
|
|
78
|
+
|
|
79
|
+
The workflow calls six semantic ports.
|
|
80
|
+
|
|
81
|
+
| Port | Workflow request | Included adapters |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `TrackerPort` | Select, claim, close, park, and record a non-runnable proposal | Pinax and Markdown backlog |
|
|
84
|
+
| `WorkspacePort` | Identify a repository, create a worktree, calculate a diff, commit, deliver, and release | Git worktree adapter |
|
|
85
|
+
| `HarnessPort` | Probe, invoke a fresh seat, cancel it, and collect usage | Claude Code, Codex, and GitHub Copilot CLI |
|
|
86
|
+
| `CommandPort` | Run the approved validator with captured output and process-tree control | Windows and POSIX process adapters |
|
|
87
|
+
| `RunRecordPort` | Create a run, append events, write evidence, and complete a report | Local filesystem records |
|
|
88
|
+
| `KnowledgePort` | Retrieve durable context and record unresolved directions | Koine or no-refill adapter |
|
|
89
|
+
|
|
90
|
+
Ports exchange dataclasses and enums. Vendor JSON, command flags, and shell strings remain inside adapters.
|
|
91
|
+
|
|
92
|
+
## Campaign state
|
|
93
|
+
|
|
94
|
+
The campaign runner owns the queue loop:
|
|
95
|
+
|
|
96
|
+
```mermaid
|
|
97
|
+
flowchart LR
|
|
98
|
+
Start[Create run record] --> Select[Select next ready item]
|
|
99
|
+
Select -->|Item found| Item[Run item workflow]
|
|
100
|
+
Item -->|Accepted or parked| Bound{Item limit reached?}
|
|
101
|
+
Bound -->|No| Select
|
|
102
|
+
Bound -->|Yes| StopBound[Stop: item bound]
|
|
103
|
+
Select -->|Queue dry| Refill{Refill supplied?}
|
|
104
|
+
Refill -->|Yes| Propose[Record proposals and fog]
|
|
105
|
+
Refill -->|No| StopDry[Stop: queue dry]
|
|
106
|
+
Propose --> StopDry
|
|
107
|
+
Item -->|Structural failure| StopFailure[Stop: structural failure]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Refill runs only after the live queue is dry. `ProposalRef` rejects a runnable value, so an adapter cannot feed its own proposal back into the campaign as approved work.
|
|
111
|
+
|
|
112
|
+
## Item state
|
|
113
|
+
|
|
114
|
+
One item moves through a fixed state machine:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
ready
|
|
118
|
+
-> verified
|
|
119
|
+
-> claimed
|
|
120
|
+
-> isolated
|
|
121
|
+
-> built
|
|
122
|
+
-> validated
|
|
123
|
+
-> reviewed
|
|
124
|
+
-> correcting or escalated when evidence requires it
|
|
125
|
+
-> finalised or parked
|
|
126
|
+
-> released
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The reviewer can return `pass`, `correct`, `escalate`, or `park`.
|
|
130
|
+
|
|
131
|
+
A correction starts another fresh builder and reviewer pair. The default ceiling is two correction rounds. An escalation starts a specialist seat for the named specialist boundary. Any final result other than `pass` parks the item.
|
|
132
|
+
|
|
133
|
+
## Evidence chain
|
|
134
|
+
|
|
135
|
+
The acceptance path binds each decision to the same workspace state.
|
|
136
|
+
|
|
137
|
+
1. `WorkspacePort.diff()` calculates changed paths, content digests, a binary patch reference, and a workspace revision digest.
|
|
138
|
+
2. `CommandPort.run()` executes the declared validator in that worktree.
|
|
139
|
+
3. `ValidationEvidence` binds the validator result and changed paths to the workspace revision.
|
|
140
|
+
4. The reviewer receives the brief, patch reference, and validator output reference.
|
|
141
|
+
5. `commit_item()` recalculates the diff and rejects a changed workspace.
|
|
142
|
+
6. The product commit contains only the reviewed product paths.
|
|
143
|
+
7. The tracker adapter writes the close state after the product commit.
|
|
144
|
+
8. The tracker commit must sit immediately after the product commit.
|
|
145
|
+
9. Delivery merges the item branch, pushes the default branch, and checks the remote revision.
|
|
146
|
+
|
|
147
|
+
The application accepts a result only when this chain remains intact. A successful model process cannot substitute for missing validator or review evidence.
|
|
148
|
+
|
|
149
|
+
## Builder and reviewer isolation
|
|
150
|
+
|
|
151
|
+
Each harness adapter starts a new command invocation with a fresh session identifier. The builder receives write-capable tools allowed by the project profile.
|
|
152
|
+
|
|
153
|
+
The reviewer receives read-only tools and a read-only sandbox when the harness supports one. Its evidence pack excludes the builder transcript.
|
|
154
|
+
|
|
155
|
+
The shared harness result contracts contain a builder summary or a review decision with concrete findings. Harness adapters normalise vendor output into these contracts.
|
|
156
|
+
|
|
157
|
+
## Git delivery model
|
|
158
|
+
|
|
159
|
+
Tracker state and product state use separate commits.
|
|
160
|
+
|
|
161
|
+
For an accepted item:
|
|
162
|
+
|
|
163
|
+
1. The tracker adapter records and pushes the claim from the primary checkout.
|
|
164
|
+
2. The workspace adapter creates an item branch and worktree from that claimed revision.
|
|
165
|
+
3. The builder changes product files in the worktree.
|
|
166
|
+
4. The workspace adapter excludes the selected tracker paths from the product diff.
|
|
167
|
+
5. It creates the product commit from the reviewed path set.
|
|
168
|
+
6. The tracker adapter writes the done state in the worktree.
|
|
169
|
+
7. The workspace adapter creates the tracker commit.
|
|
170
|
+
8. It merges the item branch into the default branch with `--no-ff`.
|
|
171
|
+
9. It pushes the default branch and verifies the remote commit.
|
|
172
|
+
|
|
173
|
+
For a parked item, AutoBuild writes and delivers a tracker-only commit. It releases the worktree without merging the unaccepted product changes.
|
|
174
|
+
|
|
175
|
+
The primary checkout must be clean before a claim and before delivery. This rule prevents AutoBuild from mixing a user's uncommitted work into a campaign.
|
|
176
|
+
|
|
177
|
+
## Tracker adapters
|
|
178
|
+
|
|
179
|
+
### Pinax
|
|
180
|
+
|
|
181
|
+
The Pinax adapter delegates ordering, readiness, dependencies, gates, and event folding to the `pinax` command. It requires `.ergon/` and an approved note reference for each selected item.
|
|
182
|
+
|
|
183
|
+
Claim, park, close, and proposal events are committed under `.ergon/`. A refill proposal receives a Pinax proposal gate and stays outside the ready queue.
|
|
184
|
+
|
|
185
|
+
### Markdown backlog
|
|
186
|
+
|
|
187
|
+
The backlog adapter parses one Markdown table with `Item`, `Title`, `Status`, and `Brief` columns. Table order is queue order.
|
|
188
|
+
|
|
189
|
+
It updates only the selected row for claim, done, and park operations. Refill adds a `Proposed` row. The Git workspace adapter treats the configured backlog file as tracker state, so it cannot enter the product commit.
|
|
190
|
+
|
|
191
|
+
Auto mode chooses a tracker once during preflight. A campaign does not move from one operational record to another after work starts.
|
|
192
|
+
|
|
193
|
+
## Policy enforcement
|
|
194
|
+
|
|
195
|
+
The policy gateway wraps every port used by the workflow. It checks:
|
|
196
|
+
|
|
197
|
+
- repository, worktree, brief, and evidence paths against approved roots
|
|
198
|
+
- semantic tool permissions for every harness seat
|
|
199
|
+
- exact validator identity and argument vector
|
|
200
|
+
- command and seat timeouts against configured ceilings
|
|
201
|
+
- reviewer read-only access
|
|
202
|
+
- evidence freshness before close
|
|
203
|
+
- separate product and tracker commits before delivery
|
|
204
|
+
- protected-branch gates for claim, park, proposal, and merge operations
|
|
205
|
+
|
|
206
|
+
The public workflow does not request deployment, publication, destructive actions, or force pushes.
|
|
207
|
+
|
|
208
|
+
## Host and temporary work
|
|
209
|
+
|
|
210
|
+
The Windows and POSIX command adapters accept argument vectors. The workflow does not build shell command strings.
|
|
211
|
+
|
|
212
|
+
Each adapter captures standard output and standard error in files. Timeout and cancellation stop the process tree started for that request.
|
|
213
|
+
|
|
214
|
+
Bootstrap chooses the operating system temporary directory by default. An operator can supply another scratch root. Child processes receive temporary and package cache environment variables below that root.
|
|
215
|
+
|
|
216
|
+
## Run records
|
|
217
|
+
|
|
218
|
+
The local record adapter writes one directory per campaign:
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
runs/<run-id>/
|
|
222
|
+
manifest.json
|
|
223
|
+
events.jsonl
|
|
224
|
+
evidence/
|
|
225
|
+
report.txt
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
The manifest records the workflow version, repository, harness, model names, validator, refill counts, and selected adapter identities.
|
|
229
|
+
|
|
230
|
+
Events record the item lifecycle and point to evidence files. The run record keeps decision evidence and diagnostic references. It does not place a full builder transcript in the review pack.
|
|
231
|
+
|
|
232
|
+
## Failure handling
|
|
233
|
+
|
|
234
|
+
Preflight failures stop before a claim.
|
|
235
|
+
|
|
236
|
+
After a claim, the item workflow tries to park any builder, validator, reviewer, evidence, or adapter failure. A successful park writes the reason to the tracker and releases the worktree.
|
|
237
|
+
|
|
238
|
+
Evidence type failures mark the item as a structural failure and stop the campaign after the park. Other parked outcomes allow the campaign result to report the item honestly.
|
|
239
|
+
|
|
240
|
+
A hard process kill can interrupt cleanup. AutoBuild preserves any remaining Git branch or worktree for inspection but does not attach a new campaign to it automatically.
|
|
241
|
+
|
|
242
|
+
## Extension points
|
|
243
|
+
|
|
244
|
+
### Add a harness
|
|
245
|
+
|
|
246
|
+
Implement `HarnessPort`, use the shared result contracts, and register the adapter through the `autobuild.adapters` Python entry-point group. Add it to the shared contract and process integration tests.
|
|
247
|
+
|
|
248
|
+
The application and policy layers require no provider switch.
|
|
249
|
+
|
|
250
|
+
### Add a tracker
|
|
251
|
+
|
|
252
|
+
Implement `TrackerPort` with durable claim, close, park, and non-runnable proposal operations. Register its configuration and tracker paths in bootstrap. Reuse `GitWorkspaceAdapter` for separate product and tracker commits.
|
|
253
|
+
|
|
254
|
+
The campaign and item workflows remain unchanged.
|
|
255
|
+
|
|
256
|
+
### Add a host process adapter
|
|
257
|
+
|
|
258
|
+
Implement `CommandPort` with argument-vector execution, captured output, timeout, cancellation, and process-tree teardown. Bind it in bootstrap for the new host capability.
|
|
259
|
+
|
|
260
|
+
### Add a knowledge adapter
|
|
261
|
+
|
|
262
|
+
Implement `KnowledgePort`. Keep operational queue state in the tracker. The knowledge adapter handles durable context and unresolved directions only.
|
|
263
|
+
|
|
264
|
+
## Architecture tests
|
|
265
|
+
|
|
266
|
+
Architecture tests parse imports and fail when domain, ports, application, or enforcement point toward a forbidden outer layer. They also reject provider and host words in application logic.
|
|
267
|
+
|
|
268
|
+
Unit tests run the campaign and item state machines against fake ports. They cover acceptance, corrections, specialist escalation, park, structural failure, run bounds, and proposal-only refill.
|
|
269
|
+
|
|
270
|
+
Contract tests prove that an additional harness can register without an application change.
|
|
271
|
+
|
|
272
|
+
Integration tests use real temporary Git repositories, bare remotes, Pinax, Markdown backlog files, fake harness processes, and platform command adapters. They verify claim, separate commits, merge, push, remote revision, cancellation, path handling, and automatic backlog fallback.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Harness adapters
|
|
2
|
+
|
|
3
|
+
Coding assistants expose different commands, permission controls, output formats and authentication checks. An automated build becomes hard to trust when those differences change the build process itself.
|
|
4
|
+
|
|
5
|
+
AutoBuild sends the same typed seat request to every coding assistant. A small adapter translates that request into one command and converts the result back into the same builder or reviewer record. The build sequence does not know which command handled the work.
|
|
6
|
+
|
|
7
|
+
## Adapter sequence
|
|
8
|
+
|
|
9
|
+
1. AutoBuild creates a fresh builder request for one tracked item and its isolated workspace.
|
|
10
|
+
2. The selected adapter starts its command with the approved model, tools, paths and timeout.
|
|
11
|
+
3. The builder leaves its product changes uncommitted so validation can inspect the final workspace state.
|
|
12
|
+
4. AutoBuild creates a fresh reviewer request containing the brief, diff and validator evidence. It does not include the builder transcript.
|
|
13
|
+
5. The adapter returns the same typed verdict and usage record whichever command ran the seat.
|
|
14
|
+
|
|
15
|
+
## Request and result flow
|
|
16
|
+
|
|
17
|
+
The operator approves the item, model classes and tool policy before the campaign starts. The policy is readable in the runtime profile and can be changed before a run. AutoBuild freezes the selected adapters after their executable, version and authentication probes pass.
|
|
18
|
+
|
|
19
|
+
The workflow renders the builder instructions once. They name the approved brief, acceptance criteria, workspace and result contract. The adapter receives those finished instructions through a typed request (`SeatRequest`).
|
|
20
|
+
|
|
21
|
+
The adapter maps the abstract model class to the command's model name. It also maps semantic tools such as `read`, `write`, `python` and `git` to the command's permission flags. An unknown tool fails before the command starts.
|
|
22
|
+
|
|
23
|
+
The host command adapter starts the process and captures both output streams under the active temporary work root. It owns quoting, environment inheritance, timeout, cancellation and process tree termination. The harness adapter never creates a second process runner.
|
|
24
|
+
|
|
25
|
+
The command must return one of two small JSON contracts. A builder returns a summary. A reviewer returns a disposition and concrete findings. AutoBuild writes a normalised JSON record and keeps the raw command output as diagnostic evidence.
|
|
26
|
+
|
|
27
|
+
## Seat safeguards
|
|
28
|
+
|
|
29
|
+
- Every seat receives a new session identifier and cannot resume a previous conversation.
|
|
30
|
+
- Review seats receive read-only tools and a read-only sandbox where the command supports one.
|
|
31
|
+
- The reviewer receives the brief, diff and validation evidence. Builder transcripts stay outside the review pack.
|
|
32
|
+
- The policy gateway rejects undeclared tools, paths outside the workspace and timeouts above the approved ceiling.
|
|
33
|
+
- Every child process receives `TMPDIR`, `TEMP`, `TMP` and package caches under the active temporary work root. The standard system temporary directory is the default. An operator can supply another root for a machine that needs it.
|
|
34
|
+
- A successful process with missing or malformed result JSON is an evidence failure.
|
|
35
|
+
- Usage is reported when the command supplies it. Missing usage remains explicitly unavailable.
|
|
36
|
+
|
|
37
|
+
AutoBuild accepts a seat only when these checks pass. A command name or a successful exit code is not enough.
|
|
38
|
+
|
|
39
|
+
## Responsibility boundaries
|
|
40
|
+
|
|
41
|
+
The adapters do not choose work, decide acceptance, run validators, merge branches or update the tracker. Those responsibilities remain in the shared workflow and the other ports.
|
|
42
|
+
|
|
43
|
+
An adapter reports unavailable when its executable or authentication probe fails.
|
|
44
|
+
|
|
45
|
+
## Implementation details
|
|
46
|
+
|
|
47
|
+
### Shared result contracts
|
|
48
|
+
|
|
49
|
+
Builder result:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"summary": "What changed and why",
|
|
54
|
+
"report_ref": "Reference supplied by the command, or an empty string"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Reviewer result:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"decision": "pass",
|
|
63
|
+
"findings": [],
|
|
64
|
+
"evidence_ref": "Reference supplied by the command, or an empty string"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Blocking decisions use `correct`, `escalate` or `park` and require at least one finding. Each finding carries a code, concrete consequence and evidence reference. A specialist boundary is optional.
|
|
69
|
+
|
|
70
|
+
### Command mappings
|
|
71
|
+
|
|
72
|
+
| Adapter | Programmatic command | Fresh context and permissions | Result handling |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| Claude Code | `claude --print` | New session id, no persistence, safe mode, explicit tools, `dontAsk` permission mode | `--output-format json` with `--json-schema` |
|
|
75
|
+
| Codex | `codex ... exec` | Ephemeral session, ignored project rules, `never` approval policy, workspace-write builder or read-only reviewer sandbox | JSONL events, `--output-schema`, and `--output-last-message` |
|
|
76
|
+
| GitHub Copilot | `copilot --prompt` | New session id, explicit available and allowed tools, no user questions, no remote export, no custom instructions | `--output-format json` JSONL normalised to the shared contract |
|
|
77
|
+
|
|
78
|
+
The GitHub Copilot command also uses `--disallow-temp-dir`. The child environment points every temporary and cache path at the active temporary work root.
|
|
79
|
+
|
|
80
|
+
### Runtime registration
|
|
81
|
+
|
|
82
|
+
The built-in adapter names are `claude-code`, `codex` and `github-copilot`. Each factory receives the bound host command port, an output directory, an optional command override and a model map. A fourth adapter can register through the same Python entry-point surface without editing the workflow.
|
|
83
|
+
|
|
84
|
+
### Version compatibility
|
|
85
|
+
|
|
86
|
+
The executable help text and official command documentation define the supported flags. AutoBuild records the observed CLI version in each run manifest. Install each coding assistant through its vendor's official tooling so its command and supporting runtime stay together.
|
|
87
|
+
|
|
88
|
+
Official references:
|
|
89
|
+
|
|
90
|
+
- [Claude Code command-line reference](https://code.claude.com/docs/en/cli-reference)
|
|
91
|
+
- [Codex CLI repository](https://github.com/openai/codex)
|
|
92
|
+
- [GitHub Copilot CLI programmatic reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-programmatic-reference)
|