crew-agentic 0.9.0__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.
- crew_agentic-0.9.0/.github/ISSUE_TEMPLATE/bug_report.yml +30 -0
- crew_agentic-0.9.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- crew_agentic-0.9.0/.github/ISSUE_TEMPLATE/feature_request.yml +16 -0
- crew_agentic-0.9.0/.github/SECURITY.md +25 -0
- crew_agentic-0.9.0/.github/dependabot.yml +26 -0
- crew_agentic-0.9.0/.github/pull_request_template.md +16 -0
- crew_agentic-0.9.0/.github/workflows/ci.yml +82 -0
- crew_agentic-0.9.0/.github/workflows/claude-smoke.yml +47 -0
- crew_agentic-0.9.0/.github/workflows/release.yml +67 -0
- crew_agentic-0.9.0/.gitignore +22 -0
- crew_agentic-0.9.0/.python-version +1 -0
- crew_agentic-0.9.0/CHANGELOG.md +194 -0
- crew_agentic-0.9.0/CLAUDE.md +59 -0
- crew_agentic-0.9.0/CONTRIBUTING.md +110 -0
- crew_agentic-0.9.0/LICENSE +21 -0
- crew_agentic-0.9.0/Makefile +29 -0
- crew_agentic-0.9.0/PKG-INFO +187 -0
- crew_agentic-0.9.0/README.md +159 -0
- crew_agentic-0.9.0/alembic.ini +22 -0
- crew_agentic-0.9.0/docs/AGENT_ROLES.md +115 -0
- crew_agentic-0.9.0/docs/ARCHITECTURE.md +229 -0
- crew_agentic-0.9.0/docs/CONFIGURATION.md +254 -0
- crew_agentic-0.9.0/docs/DECISIONS.md +471 -0
- crew_agentic-0.9.0/docs/INSTALLATION.md +116 -0
- crew_agentic-0.9.0/docs/INTEGRATIONS.md +109 -0
- crew_agentic-0.9.0/docs/PRODUCT_SPEC.md +103 -0
- crew_agentic-0.9.0/docs/README.md +46 -0
- crew_agentic-0.9.0/docs/ROADMAP.md +211 -0
- crew_agentic-0.9.0/docs/SECURITY.md +106 -0
- crew_agentic-0.9.0/docs/TECHNICAL_SPEC.md +174 -0
- crew_agentic-0.9.0/docs/USAGE.md +218 -0
- crew_agentic-0.9.0/docs/WORKFLOW.md +125 -0
- crew_agentic-0.9.0/docs/examples/README.md +17 -0
- crew_agentic-0.9.0/docs/examples/spring-boot-crud.md +252 -0
- crew_agentic-0.9.0/pyproject.toml +84 -0
- crew_agentic-0.9.0/scripts/measure-reference.sh +63 -0
- crew_agentic-0.9.0/src/crew/__init__.py +3 -0
- crew_agentic-0.9.0/src/crew/__main__.py +5 -0
- crew_agentic-0.9.0/src/crew/agents/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/agents/contracts.py +135 -0
- crew_agentic-0.9.0/src/crew/agents/payloads.py +297 -0
- crew_agentic-0.9.0/src/crew/agents/permission_server.py +201 -0
- crew_agentic-0.9.0/src/crew/agents/prompts/director.md +17 -0
- crew_agentic-0.9.0/src/crew/agents/prompts/evaluator.md +11 -0
- crew_agentic-0.9.0/src/crew/agents/prompts/implementer.md +16 -0
- crew_agentic-0.9.0/src/crew/agents/prompts/reviewer.md +14 -0
- crew_agentic-0.9.0/src/crew/agents/prompts/shared.md +10 -0
- crew_agentic-0.9.0/src/crew/agents/runtime.py +205 -0
- crew_agentic-0.9.0/src/crew/application/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/application/doctor.py +304 -0
- crew_agentic-0.9.0/src/crew/application/integrations.py +87 -0
- crew_agentic-0.9.0/src/crew/application/project.py +270 -0
- crew_agentic-0.9.0/src/crew/cli/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/cli/app.py +784 -0
- crew_agentic-0.9.0/src/crew/config/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/config/detect.py +134 -0
- crew_agentic-0.9.0/src/crew/config/loader.py +94 -0
- crew_agentic-0.9.0/src/crew/config/schema.py +244 -0
- crew_agentic-0.9.0/src/crew/context/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/context/collector.py +104 -0
- crew_agentic-0.9.0/src/crew/domain/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/domain/enums.py +120 -0
- crew_agentic-0.9.0/src/crew/domain/errors.py +77 -0
- crew_agentic-0.9.0/src/crew/domain/task_graph.py +131 -0
- crew_agentic-0.9.0/src/crew/integrations/__init__.py +7 -0
- crew_agentic-0.9.0/src/crew/integrations/adf.py +116 -0
- crew_agentic-0.9.0/src/crew/integrations/base.py +109 -0
- crew_agentic-0.9.0/src/crew/integrations/docs.py +107 -0
- crew_agentic-0.9.0/src/crew/integrations/factory.py +50 -0
- crew_agentic-0.9.0/src/crew/integrations/github.py +102 -0
- crew_agentic-0.9.0/src/crew/integrations/gitlab.py +108 -0
- crew_agentic-0.9.0/src/crew/integrations/http.py +100 -0
- crew_agentic-0.9.0/src/crew/integrations/jira.py +80 -0
- crew_agentic-0.9.0/src/crew/integrations/markup.py +135 -0
- crew_agentic-0.9.0/src/crew/orchestrator/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/orchestrator/engine.py +693 -0
- crew_agentic-0.9.0/src/crew/orchestrator/host.py +60 -0
- crew_agentic-0.9.0/src/crew/orchestrator/implementation.py +306 -0
- crew_agentic-0.9.0/src/crew/orchestrator/integration.py +227 -0
- crew_agentic-0.9.0/src/crew/orchestrator/lock.py +42 -0
- crew_agentic-0.9.0/src/crew/orchestrator/permissions.py +89 -0
- crew_agentic-0.9.0/src/crew/orchestrator/recovery.py +107 -0
- crew_agentic-0.9.0/src/crew/orchestrator/review.py +235 -0
- crew_agentic-0.9.0/src/crew/orchestrator/state_machine.py +75 -0
- crew_agentic-0.9.0/src/crew/orchestrator/support.py +97 -0
- crew_agentic-0.9.0/src/crew/persistence/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/persistence/database.py +66 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/env.py +41 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/script.py.mako +25 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/versions/0001_initial_schema.py +211 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/versions/0002_process_started_at.py +26 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/versions/0003_failed_state.py +26 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/versions/0004_command_sandbox.py +26 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/versions/0005_execution_usage.py +30 -0
- crew_agentic-0.9.0/src/crew/persistence/migrations/versions/0006_run_links.py +28 -0
- crew_agentic-0.9.0/src/crew/persistence/models.py +223 -0
- crew_agentic-0.9.0/src/crew/persistence/store.py +403 -0
- crew_agentic-0.9.0/src/crew/providers/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/providers/base.py +71 -0
- crew_agentic-0.9.0/src/crew/providers/claude_code/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/providers/claude_code/adapter.py +344 -0
- crew_agentic-0.9.0/src/crew/providers/claude_code/parser.py +186 -0
- crew_agentic-0.9.0/src/crew/providers/fake.py +127 -0
- crew_agentic-0.9.0/src/crew/reporting/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/reporting/renderer.py +375 -0
- crew_agentic-0.9.0/src/crew/security/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/security/execution_policy.py +319 -0
- crew_agentic-0.9.0/src/crew/security/redaction.py +83 -0
- crew_agentic-0.9.0/src/crew/security/sandbox.py +163 -0
- crew_agentic-0.9.0/src/crew/security/secret_files.py +70 -0
- crew_agentic-0.9.0/src/crew/system/__init__.py +5 -0
- crew_agentic-0.9.0/src/crew/system/locking.py +66 -0
- crew_agentic-0.9.0/src/crew/system/processes.py +132 -0
- crew_agentic-0.9.0/src/crew/system/winjob.py +145 -0
- crew_agentic-0.9.0/src/crew/workspace/__init__.py +0 -0
- crew_agentic-0.9.0/src/crew/workspace/git.py +377 -0
- crew_agentic-0.9.0/src/crew/workspace/worktrees.py +143 -0
- crew_agentic-0.9.0/tests/__init__.py +0 -0
- crew_agentic-0.9.0/tests/conftest.py +78 -0
- crew_agentic-0.9.0/tests/e2e/__init__.py +0 -0
- crew_agentic-0.9.0/tests/e2e/test_claude_smoke.py +111 -0
- crew_agentic-0.9.0/tests/e2e/test_cli.py +166 -0
- crew_agentic-0.9.0/tests/e2e/test_integrations_workflow.py +200 -0
- crew_agentic-0.9.0/tests/e2e/test_workflow.py +948 -0
- crew_agentic-0.9.0/tests/integration/__init__.py +0 -0
- crew_agentic-0.9.0/tests/integration/test_context.py +27 -0
- crew_agentic-0.9.0/tests/integration/test_doctor.py +42 -0
- crew_agentic-0.9.0/tests/integration/test_init.py +97 -0
- crew_agentic-0.9.0/tests/integration/test_store.py +66 -0
- crew_agentic-0.9.0/tests/integration/test_workspace.py +112 -0
- crew_agentic-0.9.0/tests/unit/__init__.py +0 -0
- crew_agentic-0.9.0/tests/unit/test_claude_adapter.py +393 -0
- crew_agentic-0.9.0/tests/unit/test_config.py +102 -0
- crew_agentic-0.9.0/tests/unit/test_contracts.py +65 -0
- crew_agentic-0.9.0/tests/unit/test_detect.py +100 -0
- crew_agentic-0.9.0/tests/unit/test_execution_policy.py +145 -0
- crew_agentic-0.9.0/tests/unit/test_integrations.py +361 -0
- crew_agentic-0.9.0/tests/unit/test_permission_server.py +119 -0
- crew_agentic-0.9.0/tests/unit/test_redaction.py +66 -0
- crew_agentic-0.9.0/tests/unit/test_sandbox.py +106 -0
- crew_agentic-0.9.0/tests/unit/test_state_machine.py +74 -0
- crew_agentic-0.9.0/tests/unit/test_system.py +158 -0
- crew_agentic-0.9.0/tests/unit/test_task_graph.py +66 -0
- crew_agentic-0.9.0/uv.lock +666 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Something in CREW does not work as documented
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: what
|
|
7
|
+
attributes:
|
|
8
|
+
label: What happened
|
|
9
|
+
description: What you ran, what you expected, and what happened instead.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: reproduce
|
|
14
|
+
attributes:
|
|
15
|
+
label: How to reproduce
|
|
16
|
+
description: Commands, and the relevant part of `.crew/config.yaml`. Remove secrets.
|
|
17
|
+
render: shell
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: report
|
|
20
|
+
attributes:
|
|
21
|
+
label: Run evidence
|
|
22
|
+
description: Output of `crew status <run-id>` or the failing part of `crew report <run-id>`.
|
|
23
|
+
render: text
|
|
24
|
+
- type: input
|
|
25
|
+
id: versions
|
|
26
|
+
attributes:
|
|
27
|
+
label: Versions
|
|
28
|
+
description: "`crew --version`, `claude --version`, OS and Python version"
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an improvement to CREW
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem
|
|
9
|
+
description: What are you trying to do, and what gets in the way today?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: proposal
|
|
14
|
+
attributes:
|
|
15
|
+
label: Proposal
|
|
16
|
+
description: What CREW could do instead. Note any effect on approval gates or permissions.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
CREW runs AI agents and test commands on your machine, so security reports are taken
|
|
4
|
+
seriously.
|
|
5
|
+
|
|
6
|
+
## Reporting a vulnerability
|
|
7
|
+
|
|
8
|
+
Please report it privately through
|
|
9
|
+
[GitHub security advisories](https://github.com/nm1996/crew-agentic/security/advisories/new),
|
|
10
|
+
not as a public issue. Include the CREW and Claude Code versions, your OS, and the steps
|
|
11
|
+
or configuration that reproduce it. If that form is not available, open an issue asking
|
|
12
|
+
for a private contact, without any details of the vulnerability.
|
|
13
|
+
|
|
14
|
+
Reports are especially welcome for ways an agent could:
|
|
15
|
+
|
|
16
|
+
- write outside its CREW-owned worktree or change your branch;
|
|
17
|
+
- run a command its permission rules do not allow;
|
|
18
|
+
- read files excluded as secrets, or leak secrets into logs, the database or reports;
|
|
19
|
+
- get around an approval gate.
|
|
20
|
+
|
|
21
|
+
## Supported versions
|
|
22
|
+
|
|
23
|
+
Only the latest release gets security fixes.
|
|
24
|
+
|
|
25
|
+
The threat model and safety requirements are in [docs/SECURITY.md](../docs/SECURITY.md).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Weekly dependency updates. Minor and patch bumps arrive as one grouped PR per
|
|
2
|
+
# ecosystem; major bumps get their own PR. Security updates are separate and immediate.
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: uv
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: weekly
|
|
9
|
+
day: monday
|
|
10
|
+
open-pull-requests-limit: 5
|
|
11
|
+
commit-message:
|
|
12
|
+
prefix: build
|
|
13
|
+
groups:
|
|
14
|
+
python-minor-and-patch:
|
|
15
|
+
update-types: [minor, patch]
|
|
16
|
+
|
|
17
|
+
- package-ecosystem: github-actions
|
|
18
|
+
directory: /
|
|
19
|
+
schedule:
|
|
20
|
+
interval: weekly
|
|
21
|
+
day: monday
|
|
22
|
+
commit-message:
|
|
23
|
+
prefix: chore
|
|
24
|
+
groups:
|
|
25
|
+
actions:
|
|
26
|
+
patterns: ["*"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## What and why
|
|
2
|
+
|
|
3
|
+
<!-- One or two sentences. Link the issue if there is one. -->
|
|
4
|
+
|
|
5
|
+
## How it was verified
|
|
6
|
+
|
|
7
|
+
- [ ] `uv run pytest`
|
|
8
|
+
- [ ] `uv run ruff check . && uv run ruff format --check .`
|
|
9
|
+
- [ ] `uv run --with mypy --with types-PyYAML --with types-psutil mypy`
|
|
10
|
+
- [ ] Real Claude CLI (`CREW_CLAUDE_SMOKE=1 uv run pytest -m claude -s`), if the adapter changed
|
|
11
|
+
|
|
12
|
+
## Checklist
|
|
13
|
+
|
|
14
|
+
- [ ] PR title follows Conventional Commits (`feat:`, `fix:`, `docs:` …); it becomes the squash commit
|
|
15
|
+
- [ ] Docs and `CHANGELOG.md` updated where behaviour changed
|
|
16
|
+
- [ ] New non-obvious decisions recorded in `docs/DECISIONS.md`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
merge_group:
|
|
8
|
+
|
|
9
|
+
# A new push to a PR cancels its previous, now outdated, run.
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.event.pull_request.number || github.ref }}
|
|
12
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
lint:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v7
|
|
22
|
+
- uses: astral-sh/setup-uv@v7
|
|
23
|
+
- run: uv sync --dev --locked
|
|
24
|
+
- run: uv run ruff check .
|
|
25
|
+
- run: uv run ruff format --check .
|
|
26
|
+
|
|
27
|
+
typecheck:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v7
|
|
31
|
+
- uses: astral-sh/setup-uv@v7
|
|
32
|
+
- run: uv sync --dev --locked
|
|
33
|
+
# Not in the lockfile: type checking needs no pinned runtime dependency.
|
|
34
|
+
- run: uv run --with mypy --with types-PyYAML --with types-psutil mypy
|
|
35
|
+
|
|
36
|
+
test:
|
|
37
|
+
name: test (${{ matrix.os }}, py${{ matrix.python-version }})
|
|
38
|
+
runs-on: ${{ matrix.os }}
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
43
|
+
python-version: ["3.12", "3.13"]
|
|
44
|
+
include:
|
|
45
|
+
# Exercise CRLF conversion, the most common Windows Git setup.
|
|
46
|
+
- os: windows-latest
|
|
47
|
+
python-version: "3.13"
|
|
48
|
+
autocrlf: "true"
|
|
49
|
+
steps:
|
|
50
|
+
- if: matrix.autocrlf
|
|
51
|
+
run: git config --global core.autocrlf ${{ matrix.autocrlf }}
|
|
52
|
+
- uses: actions/checkout@v7
|
|
53
|
+
- uses: astral-sh/setup-uv@v7
|
|
54
|
+
with:
|
|
55
|
+
python-version: ${{ matrix.python-version }}
|
|
56
|
+
- name: Enable bubblewrap sandbox tests (Linux)
|
|
57
|
+
if: runner.os == 'Linux'
|
|
58
|
+
run: |
|
|
59
|
+
sudo apt-get update -qq && sudo apt-get install -y -qq bubblewrap
|
|
60
|
+
# Ubuntu 24.04 restricts unprivileged user namespaces via AppArmor.
|
|
61
|
+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
|
|
62
|
+
- name: Configure git identity for test repositories
|
|
63
|
+
run: |
|
|
64
|
+
git config --global user.name "CI"
|
|
65
|
+
git config --global user.email "ci@example.com"
|
|
66
|
+
git config --global init.defaultBranch main
|
|
67
|
+
- run: uv sync --dev --locked
|
|
68
|
+
- run: uv run pytest
|
|
69
|
+
|
|
70
|
+
# The one status check branch protection requires: matrix job names change when the
|
|
71
|
+
# matrix does, this name does not.
|
|
72
|
+
ci-ok:
|
|
73
|
+
if: always()
|
|
74
|
+
needs: [lint, typecheck, test]
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- name: All CI jobs passed
|
|
78
|
+
run: |
|
|
79
|
+
echo "lint: ${{ needs.lint.result }}, typecheck: ${{ needs.typecheck.result }}, test: ${{ needs.test.result }}"
|
|
80
|
+
test "${{ needs.lint.result }}" = success
|
|
81
|
+
test "${{ needs.typecheck.result }}" = success
|
|
82
|
+
test "${{ needs.test.result }}" = success
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Claude smoke
|
|
2
|
+
|
|
3
|
+
# Opt-in end-to-end runs against the real Claude Code CLI on every OS.
|
|
4
|
+
# Requires the repository secret ANTHROPIC_API_KEY; each run costs a little.
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
smoke:
|
|
10
|
+
name: smoke (${{ matrix.os }})
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
16
|
+
env:
|
|
17
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
18
|
+
CREW_CLAUDE_SMOKE: "1"
|
|
19
|
+
steps:
|
|
20
|
+
- name: Require the API key secret
|
|
21
|
+
if: env.ANTHROPIC_API_KEY == ''
|
|
22
|
+
run: |
|
|
23
|
+
echo "::error::Set the ANTHROPIC_API_KEY repository secret to run this workflow."
|
|
24
|
+
exit 1
|
|
25
|
+
- uses: actions/checkout@v7
|
|
26
|
+
- uses: astral-sh/setup-uv@v7
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
- name: Install Claude Code (Linux/macOS)
|
|
30
|
+
if: runner.os != 'Windows'
|
|
31
|
+
run: |
|
|
32
|
+
curl -fsSL https://claude.ai/install.sh | bash
|
|
33
|
+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
34
|
+
- name: Install Claude Code (Windows)
|
|
35
|
+
if: runner.os == 'Windows'
|
|
36
|
+
shell: pwsh
|
|
37
|
+
run: |
|
|
38
|
+
irm https://claude.ai/install.ps1 | iex
|
|
39
|
+
"$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
|
40
|
+
- name: Configure git
|
|
41
|
+
run: |
|
|
42
|
+
git config --global user.name "CI"
|
|
43
|
+
git config --global user.email "ci@example.com"
|
|
44
|
+
git config --global init.defaultBranch main
|
|
45
|
+
- run: claude --version
|
|
46
|
+
- run: uv sync --dev --locked
|
|
47
|
+
- run: uv run pytest -m claude -s -p no:logging
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Push a tag such as v0.3.0 to publish a GitHub release with the wheel and
|
|
4
|
+
# sdist attached and the matching CHANGELOG.md section as release notes.
|
|
5
|
+
# Or run it manually on a branch (Actions → Release → Run workflow): it tags the
|
|
6
|
+
# current commit v<pyproject version> and publishes the same release.
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
tags: ["v*"]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v7
|
|
20
|
+
- uses: astral-sh/setup-uv@v7
|
|
21
|
+
- name: Check that the tag matches the package version
|
|
22
|
+
run: |
|
|
23
|
+
version=$(uv run --no-project python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
24
|
+
if [ "$GITHUB_REF_TYPE" = tag ]; then
|
|
25
|
+
test "v$version" = "$GITHUB_REF_NAME" || { echo "::error::tag $GITHUB_REF_NAME != version $version"; exit 1; }
|
|
26
|
+
elif git ls-remote --exit-code --tags origin "refs/tags/v$version" >/dev/null; then
|
|
27
|
+
echo "::error::tag v$version already exists; bump the version first"; exit 1
|
|
28
|
+
fi
|
|
29
|
+
echo "VERSION=$version" >> "$GITHUB_ENV"
|
|
30
|
+
echo "TAG=v$version" >> "$GITHUB_ENV"
|
|
31
|
+
- run: uv sync --dev --locked
|
|
32
|
+
- run: uv run pytest -q
|
|
33
|
+
- run: uv build
|
|
34
|
+
- name: Extract release notes from CHANGELOG.md
|
|
35
|
+
run: |
|
|
36
|
+
awk -v v="$VERSION" '$0 ~ "^## \\[" v "\\]" {f=1; next} /^## \[/ {f=0} f' CHANGELOG.md > notes.md
|
|
37
|
+
test -s notes.md || { echo "::error::no CHANGELOG entry for $VERSION"; exit 1; }
|
|
38
|
+
printf '\n### Install\n\n```bash\nuv tool install https://github.com/%s/releases/download/%s/crew_agentic-%s-py3-none-any.whl\n```\n' \
|
|
39
|
+
"$GITHUB_REPOSITORY" "$TAG" "$VERSION" >> notes.md
|
|
40
|
+
- name: Publish GitHub release
|
|
41
|
+
env:
|
|
42
|
+
GH_TOKEN: ${{ github.token }}
|
|
43
|
+
run: |
|
|
44
|
+
if [ "$GITHUB_REF_TYPE" = tag ]; then target=(--verify-tag); else target=(--target "$GITHUB_SHA"); fi
|
|
45
|
+
gh release create "$TAG" dist/* --title "CREW $VERSION" --notes-file notes.md "${target[@]}"
|
|
46
|
+
- uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: dist
|
|
49
|
+
path: dist/
|
|
50
|
+
|
|
51
|
+
# Publishes the same files to PyPI with trusted publishing (no token stored here).
|
|
52
|
+
# Off until the repository variable PUBLISH_TO_PYPI is "true"; set it after adding
|
|
53
|
+
# this repository as a trusted publisher of `crew-agentic` on pypi.org
|
|
54
|
+
# (workflow release.yml, environment pypi).
|
|
55
|
+
pypi:
|
|
56
|
+
needs: release
|
|
57
|
+
if: vars.PUBLISH_TO_PYPI == 'true'
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
environment: pypi
|
|
60
|
+
permissions:
|
|
61
|
+
id-token: write
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/download-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: dist
|
|
66
|
+
path: dist/
|
|
67
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
.venv/
|
|
8
|
+
|
|
9
|
+
# Tooling caches
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
htmlcov/
|
|
15
|
+
|
|
16
|
+
# CREW runtime state when dogfooding CREW on itself
|
|
17
|
+
.crew/
|
|
18
|
+
|
|
19
|
+
# Editors / OS
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
.DS_Store
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.9.0] - 2026-12-02
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- The Python distribution is renamed from `crew-cli` (taken on PyPI by another project)
|
|
13
|
+
to `crew-agentic`. The command is still `crew`. To switch an existing install:
|
|
14
|
+
`uv tool uninstall crew-cli`, then install `crew-agentic`.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `crew run --interactive` / `-i`: shows the plan and later the report, and asks at each
|
|
18
|
+
approval gate in the same command. Enter means later; nothing is approved by default.
|
|
19
|
+
- The release workflow can publish to PyPI with trusted publishing; it is off until the
|
|
20
|
+
repository variable `PUBLISH_TO_PYPI` is `true`.
|
|
21
|
+
- `scripts/measure-reference.sh` re-runs the measured Spring Boot reference example with
|
|
22
|
+
the current defaults and prints the cost table.
|
|
23
|
+
|
|
24
|
+
## [0.8.0] - 2026-12-02
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- `crew init` detects the build system at the repository root (uv/pytest, npm/pnpm/yarn,
|
|
28
|
+
Maven, Gradle, Go, Cargo) and sets `verification_commands` plus scoped Implementer and
|
|
29
|
+
Reviewer shell rules, so agents can build and test what they write. `--no-detect`
|
|
30
|
+
turns this off (D27).
|
|
31
|
+
- Live agent activity: every tool call an agent makes is shown while the run works and
|
|
32
|
+
written to `.crew/runs/<id>/activity.log`; `crew logs <run-id> [-f]` shows or follows
|
|
33
|
+
it (D29).
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
- Failing verification commands start a correction cycle straight away, with the
|
|
37
|
+
command output in the correction task, instead of relying on the Reviewer to flag
|
|
38
|
+
them. The Reviewer runs once the change is green (D28).
|
|
39
|
+
- CI type-checks `src/` with mypy; `ci-ok` requires it.
|
|
40
|
+
- New projects start with `profile: balanced`, `review_context: summary` and
|
|
41
|
+
`skip_evaluation_max_lines: 150`. Existing configs are not changed (D27).
|
|
42
|
+
- Claude Code is started with `--exclude-dynamic-system-prompt-sections`, so agents in
|
|
43
|
+
different worktrees share the prompt cache (D27).
|
|
44
|
+
|
|
45
|
+
## [0.7.0] - 2026-11-27
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
- GitLab code host (`integrations.code_host.kind: gitlab`, gitlab.com or self-managed):
|
|
49
|
+
`crew publish --pr` opens a merge request, `--review` posts notes, `--pr-comments` reads
|
|
50
|
+
MR notes.
|
|
51
|
+
- `crew publish --review` posts Reviewer findings that name a file and line as inline
|
|
52
|
+
comments (GitHub and GitLab), on top of the full review body.
|
|
53
|
+
- `execution.skip_evaluation_max_lines`: skip the External Evaluator for small changes
|
|
54
|
+
whose verification commands all passed and that have no blocking findings (D26).
|
|
55
|
+
- Director `project_notes` (build/test commands, layout, conventions) are passed to every
|
|
56
|
+
Implementer and shown in `plan.md`, so Implementers do not rediscover the project; the
|
|
57
|
+
Director is told about the fixed per-task cost and not to over-split (D26).
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
- `orchestrator/engine.py` (≈1,400 lines) is split into stage modules: `implementation`,
|
|
61
|
+
`integration`, `review`, `permissions` and `support`; behaviour is unchanged.
|
|
62
|
+
- Git commands of parallel tasks run off the event loop, so one task's merge or commit no
|
|
63
|
+
longer stalls the other Implementer (D26).
|
|
64
|
+
|
|
65
|
+
## [0.6.0] - 2026-11-27
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
- `execution.serialize_shared_files` (default on): planned tasks whose expected files
|
|
69
|
+
overlap get a dependency on each other, so they never run in parallel on the same file.
|
|
70
|
+
The added ordering is shown in `plan.md` before approval (D25).
|
|
71
|
+
- The Director is asked to list shared files (build manifests, routers, changelogs) in
|
|
72
|
+
`expected_files`.
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
- In a diamond (`c` depends on `a` and `b`), a conflict between `a` and `b` was resolved
|
|
76
|
+
in `c`'s worktree and then again at integration; the branch now arrives through `c`.
|
|
77
|
+
- A `=======` Markdown heading underline in a conflicted file was taken for a leftover
|
|
78
|
+
conflict marker and failed the run.
|
|
79
|
+
- Files the conflict resolver changed outside the conflict were left uncommitted in the
|
|
80
|
+
worktree; the resolution is now rejected instead.
|
|
81
|
+
- Documentation: README and specs said CREW never pushes, although `crew publish --pr`
|
|
82
|
+
pushes the run's integration branch; architecture layout, roadmap status and command
|
|
83
|
+
list caught up with 0.3–0.5.
|
|
84
|
+
|
|
85
|
+
## [0.5.1] - 2026-11-26
|
|
86
|
+
|
|
87
|
+
### Added
|
|
88
|
+
- `crew run --file request.md`: read the request from a file.
|
|
89
|
+
- Build and runtime files (`pom.xml`, Gradle, `requirements.txt`, `Dockerfile`, …) in
|
|
90
|
+
the Director's key-file context, within a 40 kB budget.
|
|
91
|
+
- "Giving the Director input" in docs/USAGE.md.
|
|
92
|
+
|
|
93
|
+
## [0.5.0] - 2026-11-26
|
|
94
|
+
|
|
95
|
+
Integrations and interactive permissions (M9).
|
|
96
|
+
|
|
97
|
+
### Added
|
|
98
|
+
- Integration adapters: Jira Cloud (issues, comments, transitions), GitHub (PRs, reviews,
|
|
99
|
+
review comments), Confluence Cloud and a Markdown folder (context pages, report pages).
|
|
100
|
+
- `crew run --issue KEY`, `--doc REF` (repeatable) and `--pr-comments N`.
|
|
101
|
+
- `crew publish <run> [--pr --draft --review --docs --no-issue --yes]` for COMPLETED runs;
|
|
102
|
+
the only push CREW performs, limited to the run's integration branch.
|
|
103
|
+
- `approvals.permission_prompts: ask`: agents can ask for permissions outside their
|
|
104
|
+
rules through CREW's MCP approval tool; destructive and network commands are always
|
|
105
|
+
denied; answers are recorded.
|
|
106
|
+
- `crew doctor` checks configured integrations and credential variables.
|
|
107
|
+
- docs/INTEGRATIONS.md; decisions D23–D24; exit code 13 (integration error).
|
|
108
|
+
|
|
109
|
+
## [0.4.0] - 2026-11-26
|
|
110
|
+
|
|
111
|
+
Cost controls and robustness, driven by a measured reference run (Spring Boot CRUD).
|
|
112
|
+
|
|
113
|
+
### Added
|
|
114
|
+
- Token usage, turns and model per agent execution; "Agent usage" table in reports.
|
|
115
|
+
- Measured reference example: Spring Boot CRUD service (`docs/examples/`).
|
|
116
|
+
- M9 roadmap: permission prompts and integration adapters (Jira, code host, review,
|
|
117
|
+
Confluence).
|
|
118
|
+
- Cost profiles (`provider.claude_code.profile: default|balanced|economy`), per-role model
|
|
119
|
+
and `--effort` overrides (`provider.claude_code.roles`), and
|
|
120
|
+
`execution.review_context: summary`. Measured on the reference run: default $3.34,
|
|
121
|
+
balanced $2.87, economy $1.28, all independently verified.
|
|
122
|
+
- Merge conflicts are resolved by an Implementer (`execution.conflict_resolution`);
|
|
123
|
+
changes outside a task's planned files are reported.
|
|
124
|
+
|
|
125
|
+
### Fixed
|
|
126
|
+
- Run ids were truncated in `crew history` in narrow terminals.
|
|
127
|
+
- Claude usage/rate limits were retried immediately; they now stop the run cleanly and
|
|
128
|
+
`crew retry` continues after the reset.
|
|
129
|
+
|
|
130
|
+
## [0.3.0] - 2026-11-26
|
|
131
|
+
|
|
132
|
+
### Added
|
|
133
|
+
- `execution.sandbox` (`none` | `bwrap` | `docker`) isolates verification commands, which
|
|
134
|
+
run agent-written code: read-only filesystem except the worktree, hidden credential
|
|
135
|
+
directories, no network by default. Fails closed when unavailable; recorded per command;
|
|
136
|
+
checked by `crew doctor`.
|
|
137
|
+
- Windows Job Objects: agent and verification process trees are always stopped together,
|
|
138
|
+
including grandchildren of exited parents, and die with CREW.
|
|
139
|
+
- Opt-in real-CLI smoke test for scoped shell rules, and a manually triggered
|
|
140
|
+
"Claude smoke" workflow for Linux, macOS and Windows (needs `ANTHROPIC_API_KEY`).
|
|
141
|
+
- Tag-driven release workflow publishing the wheel, sdist and changelog notes.
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
- CI installs bubblewrap so sandbox isolation is tested for real on Linux.
|
|
145
|
+
|
|
146
|
+
## [0.2.0] - 2026-11-26
|
|
147
|
+
|
|
148
|
+
Hardening and cross-platform release, driven by an independent review of 0.1.0.
|
|
149
|
+
|
|
150
|
+
### Added
|
|
151
|
+
- Windows and macOS support; CI on Linux, macOS and Windows with Python 3.12/3.13.
|
|
152
|
+
- `crew retry <run-id>`: retry a FAILED run from the stage it failed in.
|
|
153
|
+
- `crew cleanup <run-id>|--all [--branches]`: remove finished runs' worktrees and merged
|
|
154
|
+
CREW branches.
|
|
155
|
+
- `execution.max_run_budget_usd`: per-run spending limit; cost shown in `crew status`.
|
|
156
|
+
- Verification commands may be argv lists; scoped `PowerShell(...)` rules.
|
|
157
|
+
- `crew.system` platform layer (psutil-based process trees, portable file lock).
|
|
158
|
+
- MIT license.
|
|
159
|
+
|
|
160
|
+
### Changed
|
|
161
|
+
- `--restricted` is mandatory and `--strict-mcp-config` is always passed; security flags
|
|
162
|
+
precede free-text arguments.
|
|
163
|
+
- Reviewer and Evaluator run in disposable snapshot worktrees.
|
|
164
|
+
- Correction tasks are named `crew-fix-<n>`; the `crew-` prefix is reserved in plans.
|
|
165
|
+
- Git commands are recorded per run; all git calls run with hooks disabled.
|
|
166
|
+
|
|
167
|
+
### Fixed
|
|
168
|
+
- Secret redaction could corrupt stored JSON and break a run's report.
|
|
169
|
+
- A cancel requested during planning fired only after the plan was approved.
|
|
170
|
+
- Agent processes could outlive a terminated CREW process; `stop` did not reconcile them.
|
|
171
|
+
- Unexpected errors left tasks or executions stuck in RUNNING.
|
|
172
|
+
- Non-UTF-8 git output could fail a run; renamed paths were mis-parsed.
|
|
173
|
+
- Git write commands were not blocked in the developer's worktree.
|
|
174
|
+
- New secret files created by agents could be committed to CREW branches.
|
|
175
|
+
- `info/exclude` was written to the wrong place in linked worktrees.
|
|
176
|
+
- `execution.preserve_worktrees_on_failure` was ignored.
|
|
177
|
+
|
|
178
|
+
## [0.1.0] - 2026-11-26 (initial MVP)
|
|
179
|
+
|
|
180
|
+
### Added
|
|
181
|
+
- `crew` CLI: `init`, `doctor`, `configure`, `run`, `plan`, `approve-plan`, `reject-plan`,
|
|
182
|
+
`accept`, `reject`, `status`, `tasks`, `history`, `show`, `resume`, `stop`, `report`.
|
|
183
|
+
- Validated run state machine with plan and final approval gates that cannot be disabled.
|
|
184
|
+
- Director / Implementer / Reviewer / External Evaluator roles with schema-validated output.
|
|
185
|
+
- Dependency-aware scheduler with at most two concurrent Implementers.
|
|
186
|
+
- Per-task Git worktrees and merge-based integration into a CREW-owned branch; conflict
|
|
187
|
+
detection; the developer's branch and working tree are never modified.
|
|
188
|
+
- CREW-run verification commands recorded as test evidence.
|
|
189
|
+
- Bounded review/correction cycles.
|
|
190
|
+
- SQLite persistence (WAL, Alembic migrations), append-only workflow events.
|
|
191
|
+
- Recovery (`resume`) after interruption, cooperative cancellation, per-run locking.
|
|
192
|
+
- Claude Code CLI adapter (restricted, no permission bypass) and an offline fake provider.
|
|
193
|
+
- Secret redaction for logs, database and reports; secret-file exclusions for agents.
|
|
194
|
+
- Markdown run artifacts and final report.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Instructions for Claude Code — CREW
|
|
2
|
+
|
|
3
|
+
You are working on **CREW**, a Python local-first AI development orchestration CLI. Specifications live in `docs/`: read `docs/PRODUCT_SPEC.md`, `docs/ARCHITECTURE.md`, `docs/WORKFLOW.md`, `docs/AGENT_ROLES.md`, `docs/TECHNICAL_SPEC.md`, `docs/SECURITY.md` and `docs/DECISIONS.md` before making architectural changes.
|
|
4
|
+
|
|
5
|
+
## Current state
|
|
6
|
+
|
|
7
|
+
M0–M9 in `docs/ROADMAP.md` are implemented (MVP, hardening, sandboxing, cost controls, integrations); see `CHANGELOG.md` for the current version. Commands:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv sync --dev
|
|
11
|
+
uv run pytest # offline suite; must stay green
|
|
12
|
+
uv run ruff check . && uv run ruff format --check .
|
|
13
|
+
uv run --with mypy --with types-PyYAML --with types-psutil mypy # type check, as in CI
|
|
14
|
+
CREW_CLAUDE_SMOKE=1 uv run pytest -m claude -s # opt-in, real Claude CLI
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Code map: `docs/ARCHITECTURE.md#implemented-layout`. Record new non-obvious decisions in `docs/DECISIONS.md`. Schema changes need an Alembic revision (see `CONTRIBUTING.md`).
|
|
18
|
+
|
|
19
|
+
## Operating rules
|
|
20
|
+
|
|
21
|
+
1. Work milestone by milestone according to `docs/ROADMAP.md`.
|
|
22
|
+
2. First inspect the repository, current Git status, Python versions, and installed tooling. Do not assume the environment matches the documentation.
|
|
23
|
+
3. Before coding, present a short implementation plan for the current milestone and identify files to create/change.
|
|
24
|
+
4. Do not implement the entire product in one giant change. Build a runnable vertical slice.
|
|
25
|
+
5. Do not silently change product requirements or remove safety gates.
|
|
26
|
+
6. Keep Python code direct and maintainable. Avoid speculative abstractions, needless design patterns, excessive comments, and tests that only duplicate implementation details.
|
|
27
|
+
7. Use type hints where they improve clarity. Validate external/model data at boundaries.
|
|
28
|
+
8. Keep domain/workflow logic independent of Typer, Rich, and Claude-specific types.
|
|
29
|
+
9. Use the fake provider for normal tests. Never require API credentials for the default test suite.
|
|
30
|
+
10. Verify exact Claude Code CLI flags and output formats from the installed version's help/documentation; do not invent flags.
|
|
31
|
+
11. Do not use a blanket permission-bypass mode.
|
|
32
|
+
12. Never push, deploy, release, or merge into the developer's active branch.
|
|
33
|
+
13. Never overwrite, stash, reset, or clean the developer's uncommitted work.
|
|
34
|
+
14. Do not claim tests pass unless you ran them and observed the result.
|
|
35
|
+
15. At the end of each milestone, report changed files, design decisions, commands run, test results, known limitations, and the next milestone.
|
|
36
|
+
|
|
37
|
+
## Git and change management
|
|
38
|
+
|
|
39
|
+
- Inspect `git status` before modifying files.
|
|
40
|
+
- If the working tree contains unrelated changes, preserve them and ask before proceeding where necessary.
|
|
41
|
+
- Keep changes focused.
|
|
42
|
+
- Use Conventional Commits:
|
|
43
|
+
- `feat:` new capability
|
|
44
|
+
- `fix:` bug fix
|
|
45
|
+
- `docs:` documentation
|
|
46
|
+
- `test:` tests
|
|
47
|
+
- `refactor:` behavior-preserving restructuring
|
|
48
|
+
- `build:` packaging/dependency/build changes
|
|
49
|
+
- `chore:` maintenance
|
|
50
|
+
- Do not create commits unless the developer asks or the repository workflow explicitly authorizes it.
|
|
51
|
+
|
|
52
|
+
## Definition of done for a change
|
|
53
|
+
|
|
54
|
+
- Requirements and acceptance criteria are met.
|
|
55
|
+
- No unrelated scope has been added.
|
|
56
|
+
- Relevant tests cover observable behavior and failure cases.
|
|
57
|
+
- Commands and test outcomes are reported accurately.
|
|
58
|
+
- Security and workflow invariants remain intact.
|
|
59
|
+
- Documentation is updated where behavior or commands changed.
|