cdt-release 0.4.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.
Files changed (136) hide show
  1. cdt_release-0.4.0/.agents/rules/cdt-release.md +41 -0
  2. cdt_release-0.4.0/AGENTS.md +88 -0
  3. cdt_release-0.4.0/CHANGELOG.md +102 -0
  4. cdt_release-0.4.0/CONTRIBUTING.md +39 -0
  5. cdt_release-0.4.0/LICENSE +21 -0
  6. cdt_release-0.4.0/MANIFEST.in +6 -0
  7. cdt_release-0.4.0/PKG-INFO +215 -0
  8. cdt_release-0.4.0/README.md +179 -0
  9. cdt_release-0.4.0/SECURITY.md +28 -0
  10. cdt_release-0.4.0/cdt/__init__.py +1 -0
  11. cdt_release-0.4.0/cdt/__main__.py +3 -0
  12. cdt_release-0.4.0/cdt/agent_release.py +316 -0
  13. cdt_release-0.4.0/cdt/agent_release_worker.py +46 -0
  14. cdt_release-0.4.0/cdt/artifacts.py +37 -0
  15. cdt_release-0.4.0/cdt/cdt.schema.json +1512 -0
  16. cdt_release-0.4.0/cdt/cli.py +590 -0
  17. cdt_release-0.4.0/cdt/config.py +38 -0
  18. cdt_release-0.4.0/cdt/doctor.py +81 -0
  19. cdt_release-0.4.0/cdt/flows/__init__.py +5 -0
  20. cdt_release-0.4.0/cdt/flows/deploy_flow.py +50 -0
  21. cdt_release-0.4.0/cdt/flows/ios_flow.py +52 -0
  22. cdt_release-0.4.0/cdt/flows/prod_flow.py +236 -0
  23. cdt_release-0.4.0/cdt/flows/testing_flow.py +296 -0
  24. cdt_release-0.4.0/cdt/init_project.py +95 -0
  25. cdt_release-0.4.0/cdt/pipeline/__init__.py +15 -0
  26. cdt_release-0.4.0/cdt/pipeline/builtins.py +213 -0
  27. cdt_release-0.4.0/cdt/pipeline/config.py +254 -0
  28. cdt_release-0.4.0/cdt/pipeline/context.py +164 -0
  29. cdt_release-0.4.0/cdt/pipeline/executor.py +180 -0
  30. cdt_release-0.4.0/cdt/pipeline/planning.py +314 -0
  31. cdt_release-0.4.0/cdt/pipeline/preflight.py +53 -0
  32. cdt_release-0.4.0/cdt/pipeline/registry.py +196 -0
  33. cdt_release-0.4.0/cdt/pipeline/runner.py +180 -0
  34. cdt_release-0.4.0/cdt/pipeline/step.py +10 -0
  35. cdt_release-0.4.0/cdt/pipeline/validation.py +152 -0
  36. cdt_release-0.4.0/cdt/platforms/__init__.py +1 -0
  37. cdt_release-0.4.0/cdt/platforms/android.py +137 -0
  38. cdt_release-0.4.0/cdt/platforms/flutter_build.py +60 -0
  39. cdt_release-0.4.0/cdt/platforms/ios_flutter.py +66 -0
  40. cdt_release-0.4.0/cdt/platforms/ios_xcode.py +214 -0
  41. cdt_release-0.4.0/cdt/platforms/web.py +104 -0
  42. cdt_release-0.4.0/cdt/py.typed +0 -0
  43. cdt_release-0.4.0/cdt/runner.py +108 -0
  44. cdt_release-0.4.0/cdt/runs.py +243 -0
  45. cdt_release-0.4.0/cdt/schema.py +182 -0
  46. cdt_release-0.4.0/cdt/sdk.py +78 -0
  47. cdt_release-0.4.0/cdt/self_update.py +394 -0
  48. cdt_release-0.4.0/cdt/services/__init__.py +1 -0
  49. cdt_release-0.4.0/cdt/services/appstore.py +244 -0
  50. cdt_release-0.4.0/cdt/services/firebase.py +54 -0
  51. cdt_release-0.4.0/cdt/services/notify.py +112 -0
  52. cdt_release-0.4.0/cdt/services/tracker.py +43 -0
  53. cdt_release-0.4.0/cdt/sounds.py +76 -0
  54. cdt_release-0.4.0/cdt/steps/__init__.py +1 -0
  55. cdt_release-0.4.0/cdt/steps/android.py +73 -0
  56. cdt_release-0.4.0/cdt/steps/appstore.py +29 -0
  57. cdt_release-0.4.0/cdt/steps/artifact.py +29 -0
  58. cdt_release-0.4.0/cdt/steps/firebase.py +39 -0
  59. cdt_release-0.4.0/cdt/steps/flutter.py +32 -0
  60. cdt_release-0.4.0/cdt/steps/git.py +46 -0
  61. cdt_release-0.4.0/cdt/steps/hook.py +93 -0
  62. cdt_release-0.4.0/cdt/steps/ios.py +83 -0
  63. cdt_release-0.4.0/cdt/steps/notify.py +53 -0
  64. cdt_release-0.4.0/cdt/steps/tracker.py +19 -0
  65. cdt_release-0.4.0/cdt/steps/web.py +126 -0
  66. cdt_release-0.4.0/cdt/ui.py +120 -0
  67. cdt_release-0.4.0/cdt/versioning.py +60 -0
  68. cdt_release-0.4.0/cdt_release.egg-info/PKG-INFO +215 -0
  69. cdt_release-0.4.0/cdt_release.egg-info/SOURCES.txt +134 -0
  70. cdt_release-0.4.0/cdt_release.egg-info/dependency_links.txt +1 -0
  71. cdt_release-0.4.0/cdt_release.egg-info/entry_points.txt +2 -0
  72. cdt_release-0.4.0/cdt_release.egg-info/requires.txt +12 -0
  73. cdt_release-0.4.0/cdt_release.egg-info/top_level.txt +1 -0
  74. cdt_release-0.4.0/docs/ai-agents.md +150 -0
  75. cdt_release-0.4.0/docs/getting-started.md +112 -0
  76. cdt_release-0.4.0/docs/pipelines.md +141 -0
  77. cdt_release-0.4.0/docs/plans/2026-07-03-next-stage-pipeline-steps.md +304 -0
  78. cdt_release-0.4.0/docs/plans/2026-07-04-clean-020-runtime-ux.md +95 -0
  79. cdt_release-0.4.0/docs/plans/2026-07-04-remove-cdt-migrate-legacy.md +91 -0
  80. cdt_release-0.4.0/docs/plans/2026-07-04-remove-env-build-step-alias.md +50 -0
  81. cdt_release-0.4.0/docs/plans/2026-07-04-yaml-only-pipelines-legacy-migration.md +365 -0
  82. cdt_release-0.4.0/docs/plans/2026-07-06-cdt-self-update-command.md +99 -0
  83. cdt_release-0.4.0/docs/plans/2026-07-06-refine-planner-artifact-flow.md +317 -0
  84. cdt_release-0.4.0/docs/plans/2026-07-06-step-metadata-artifact-contract-cleanup.md +184 -0
  85. cdt_release-0.4.0/docs/plans/2026-07-06-v030-planning-foundation.md +299 -0
  86. cdt_release-0.4.0/docs/plans/2026-07-07-agent-release-review-fixes.md +44 -0
  87. cdt_release-0.4.0/docs/plans/2026-07-07-cdt-v0.3.3-improvements.md +184 -0
  88. cdt_release-0.4.0/docs/plans/2026-07-07-cicd-robustness-rm-rf-dist-pytest-q-retry.md +67 -0
  89. cdt_release-0.4.0/docs/plans/2026-07-07-release-resume-status.md +30 -0
  90. cdt_release-0.4.0/docs/plans/2026-07-07-token-efficient-cdt-releases-cicd-robustness.md +127 -0
  91. cdt_release-0.4.0/docs/plans/2026-07-21-agent-first-cdt-roadmap.md +465 -0
  92. cdt_release-0.4.0/docs/runs.md +92 -0
  93. cdt_release-0.4.0/docs/skills.md +35 -0
  94. cdt_release-0.4.0/examples/cdt.yaml +82 -0
  95. cdt_release-0.4.0/examples/cdt_steps/offline.py +9 -0
  96. cdt_release-0.4.0/pyproject.toml +52 -0
  97. cdt_release-0.4.0/setup.cfg +4 -0
  98. cdt_release-0.4.0/skills/cdt-release/SKILL.md +105 -0
  99. cdt_release-0.4.0/tests/test_agent_first.py +211 -0
  100. cdt_release-0.4.0/tests/test_agent_release.py +170 -0
  101. cdt_release-0.4.0/tests/test_android.py +90 -0
  102. cdt_release-0.4.0/tests/test_cli.py +346 -0
  103. cdt_release-0.4.0/tests/test_commands.py +108 -0
  104. cdt_release-0.4.0/tests/test_doctor.py +73 -0
  105. cdt_release-0.4.0/tests/test_examples.py +33 -0
  106. cdt_release-0.4.0/tests/test_flows_deploy.py +156 -0
  107. cdt_release-0.4.0/tests/test_flows_ios.py +115 -0
  108. cdt_release-0.4.0/tests/test_flows_prod.py +177 -0
  109. cdt_release-0.4.0/tests/test_flows_test.py +161 -0
  110. cdt_release-0.4.0/tests/test_ios_flutter.py +87 -0
  111. cdt_release-0.4.0/tests/test_ios_xcode.py +212 -0
  112. cdt_release-0.4.0/tests/test_pipeline_config.py +338 -0
  113. cdt_release-0.4.0/tests/test_pipeline_context.py +51 -0
  114. cdt_release-0.4.0/tests/test_pipeline_error_ux.py +54 -0
  115. cdt_release-0.4.0/tests/test_pipeline_executor.py +221 -0
  116. cdt_release-0.4.0/tests/test_pipeline_plan.py +657 -0
  117. cdt_release-0.4.0/tests/test_pipeline_registry.py +237 -0
  118. cdt_release-0.4.0/tests/test_pipeline_resume.py +259 -0
  119. cdt_release-0.4.0/tests/test_pipeline_status_file.py +185 -0
  120. cdt_release-0.4.0/tests/test_release_script.py +23 -0
  121. cdt_release-0.4.0/tests/test_runner.py +145 -0
  122. cdt_release-0.4.0/tests/test_runtime_ux.py +108 -0
  123. cdt_release-0.4.0/tests/test_self_update.py +669 -0
  124. cdt_release-0.4.0/tests/test_services_appstore.py +258 -0
  125. cdt_release-0.4.0/tests/test_services_firebase.py +88 -0
  126. cdt_release-0.4.0/tests/test_services_notify.py +153 -0
  127. cdt_release-0.4.0/tests/test_services_tracker.py +81 -0
  128. cdt_release-0.4.0/tests/test_skills.py +53 -0
  129. cdt_release-0.4.0/tests/test_sounds.py +138 -0
  130. cdt_release-0.4.0/tests/test_steps_artifact.py +60 -0
  131. cdt_release-0.4.0/tests/test_steps_firebase.py +59 -0
  132. cdt_release-0.4.0/tests/test_steps_hook.py +169 -0
  133. cdt_release-0.4.0/tests/test_ui.py +93 -0
  134. cdt_release-0.4.0/tests/test_versioning.py +43 -0
  135. cdt_release-0.4.0/tests/test_web.py +78 -0
  136. cdt_release-0.4.0/tests/test_workflows.py +48 -0
@@ -0,0 +1,41 @@
1
+ # CDT Release Agent Rules
2
+
3
+ Use these hard rules whenever an agent runs or prepares to run `cdt run`.
4
+
5
+ ## Required pre-run checks
6
+
7
+ 1. Load `skills/cdt-release/SKILL.md`.
8
+ 2. Confirm `cdt.yaml` exists in the target project.
9
+ 3. Run `cdt pipeline list` and `cdt pipeline inspect <pipeline>` before `cdt run`.
10
+ 4. Verify the inspected steps match the user's intent and are not production-like unless production was explicitly requested and confirmed.
11
+ 5. Announce the command and log path before execution.
12
+
13
+ ## Production safety
14
+
15
+ Never run production-like pipelines without exact human confirmation. This includes pipelines named or behaving like `prod`, `ios-prod`, `android-prod`, `release`, `deploy`, `production`, public publishing, production uploads, git pushes, or production infrastructure changes.
16
+
17
+ Acceptable confirmation format:
18
+
19
+ ```text
20
+ Подтверждаю production release: cdt run <pipeline>
21
+ ```
22
+
23
+ Ambiguous replies such as `ok`, `да`, `go`, or `continue` are not enough for production.
24
+
25
+ ## Logging and observability
26
+
27
+ - Use the isolated `.cdt/runs/<run-id>/output.log` created by detached execution.
28
+ - Prefer `cdt agent-release start <pipeline> --json` and `cdt agent-release status --run <run-id> --wait --json` for long releases.
29
+ - Do not paste full logs into chat.
30
+ - Do not read `tail`/`grep` from the release log during healthy long-running releases; use compact agent-release status output instead.
31
+ - Do not post repetitive progress narration such as "still waiting" while a release is healthy.
32
+ - On failure, show only the relevant error or the last 40-80 log lines.
33
+ - Summaries must include: `status`, `pipeline`, `artifacts`, `log`, `working_tree`, and `next_actions`.
34
+ - A separate JSON report is optional; create one only when useful beyond the built-in run status.
35
+
36
+ ## Forbidden actions
37
+
38
+ - Do not run `cdt run <production-like-pipeline>` without exact confirmation.
39
+ - Use `--dry-run` only for planning. Pass `--confirm <pipeline>` only after exact production approval.
40
+ - Do not immediately retry after `pubspec.yaml` or version files changed.
41
+ - Do not assume a pipeline covers Android/iOS from its name alone; inspect it.
@@ -0,0 +1,88 @@
1
+ # Instructions for AI agents working with CDT
2
+
3
+ ## Commands
4
+
5
+ ```bash
6
+ pytest
7
+ pytest --cov=cdt --cov-report=term
8
+ ruff check .
9
+ python -m build
10
+ ```
11
+
12
+ Use `python -m build` before packaging or release changes to verify package metadata and included files. For release notes, check or update `CHANGELOG.md`.
13
+
14
+ Use focused tests while editing, for example:
15
+
16
+ ```bash
17
+ pytest tests/test_skills.py
18
+ ```
19
+
20
+ ## Branch naming
21
+
22
+ When creating branches, use short intent-based names:
23
+
24
+ - `feature/<short-kebab-feature>`
25
+ - `fix/<short-kebab-bug>`
26
+ - `docs/<short-kebab-topic>`
27
+ - `chore/<short-kebab-task>`
28
+
29
+ Rules:
30
+
31
+ - use at most 3-4 meaningful words after the prefix;
32
+ - do not include dates;
33
+ - do not copy full plan titles;
34
+ - avoid implementation details unless they are the user-facing feature name;
35
+ - branch from latest `main`;
36
+ - keep one PR focused on one coherent feature, fix, or docs task.
37
+
38
+ Before pushing, check:
39
+
40
+ ```bash
41
+ git branch --show-current
42
+ git merge-base --is-ancestor origin/main HEAD
43
+ git diff --name-only origin/main...HEAD
44
+ ```
45
+
46
+ Good examples: `feature/agent-release`, `feature/run-status-file`, `fix/release-worker-exit`.
47
+ Bad examples: `feature/agent-release-token-efficient-cicd`, `feature/2026-07-07-token-efficient-cdt-releases-cicd-robustness`.
48
+
49
+ ## PR merge cleanup
50
+
51
+ Delete feature/fix/docs/chore branches after merging PRs unless the user explicitly asks to keep them.
52
+
53
+ Preferred GitHub CLI merge command:
54
+
55
+ ```bash
56
+ gh pr merge <PR> --merge --delete-branch
57
+ ```
58
+
59
+ After merging, prune local refs and remove the local topic branch if it remains:
60
+
61
+ ```bash
62
+ git fetch --prune
63
+ git branch -d <branch>
64
+ ```
65
+
66
+ The GitHub repository setting `delete_branch_on_merge` should stay enabled so web UI merges also delete merged head branches.
67
+
68
+ ## Agent skills
69
+
70
+ When asked to send, publish, upload, or run a release through CDT, load:
71
+
72
+ ```text
73
+ skills/cdt-release/SKILL.md
74
+ ```
75
+
76
+ This includes requests such as `cdt run test`, TestFlight/AppTester/Firebase uploads, Pachca notifications, and Russian requests like "отправь тестовый релиз" or "залей тестовую сборку".
77
+
78
+ ## Release safety rules
79
+
80
+ Follow `.agents/rules/cdt-release.md` for every `cdt run` prepared or executed by an agent.
81
+
82
+ Hard requirements:
83
+
84
+ - inspect `cdt.yaml` before running a pipeline;
85
+ - run `cdt pipeline list` and `cdt pipeline inspect <pipeline>` as preflight;
86
+ - use the isolated `.cdt/runs/<run-id>/output.log` created by detached execution;
87
+ - never run production-like pipelines without exact human confirmation;
88
+ - provide a concise structured summary after the run.
@@ -0,0 +1,102 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ - Nothing yet.
6
+
7
+ ## v0.4.0 - 2026-07-21
8
+
9
+ - Renamed the Python distribution to `cdt-release` while preserving the `cdt` command, and added PyPI trusted publishing to the release workflow. Existing pipx users must migrate once with `pipx uninstall cdt && pipx install cdt-release`; project `cdt.yaml` files do not require migration.
10
+ - Added isolated `.cdt/runs/<run-id>/` records with atomic manifests, statuses, exit codes, logs, latest-pipeline pointers, and concurrent-run safety.
11
+ - Added `cdt history`, `cdt status`, and `cdt logs` while preserving direct `cdt run <pipeline>` as the primary human workflow.
12
+ - Added run-ID based detached commands: `cdt agent-release status --run <run-id>` and `stop --run <run-id>`.
13
+ - Added explicit pipeline `risk: production` and exact `--confirm <pipeline>` enforcement for interactive and detached execution.
14
+ - Added Flutter/mobile project detection and reviewable test pipeline generation through `cdt init`.
15
+ - Added a bundled `cdt.yaml` JSON Schema and `cdt schema` command for editor integration.
16
+ - Updated Agent Skill guidance to use compact run status rather than parsing healthy logs.
17
+ - Added security and contribution policies, refreshed installation and pipeline documentation, and documented separate human and agent workflows.
18
+ - Consolidated duplicate CI workflows, added Python 3.13 coverage, expanded wheel smoke checks, and raised total test coverage from 81% to 84%.
19
+
20
+ ## v0.3.6 - 2026-07-18
21
+
22
+ - Added sequential branches inside parallel pipeline groups, enabling prod flows such as iOS alongside Android AAB followed immediately by APK.
23
+ - Added `notify.prod_user_agent` as a registered YAML built-in and included it in the example prod pipeline before `notify.success`.
24
+ - Added nested step IDs and child-step resume support for sequential parallel branches.
25
+ - Fixed `cdt run --skip-completed` incorrectly treating duplicate step names, including anonymous parallel groups, as the same step.
26
+ - Changed pipeline status step fields to store stable step ids instead of step names. Older name-based resume files are rejected because duplicate step names are ambiguous; recreate them or map completed work to ids from `cdt pipeline inspect <pipeline>` / `cdt pipeline plan <pipeline>`.
27
+ - Changed resume input handling: `--resume-status-file` is required for `--resume-from` and `--skip-completed`; `--status-file` only writes the current run status.
28
+
29
+ ## v0.3.5 - 2026-07-07
30
+
31
+ - Added `cdt run --resume-from` and `--skip-completed` to resume long pipeline runs from status JSON.
32
+ - Added child-level parallel runtime status fields: `running_steps`, `parallel_completed`, and `parallel_failed`.
33
+ - Added `cdt pipeline validate --strict` to fail on planner warnings during safer CI preflight.
34
+ - Added metadata-driven `requires_env` and `cdt pipeline preflight <pipeline>` for selected-pipeline tool/env checks.
35
+
36
+ ## v0.3.4 - 2026-07-07
37
+
38
+ - Added `cdt agent-release start/status/stop` for token-efficient long-running release automation.
39
+ - Added `cdt run --status-file` for machine-readable pipeline status.
40
+ - Hardened CI/CD checks with clean `dist` builds, quiet pytest, and tag smoke retry regressions.
41
+
42
+ ## v0.3.3 - 2026-07-07
43
+
44
+ - Automated release pipeline via GitHub Actions.
45
+ - Hardened the release helper with explicit push mode, safer changelog formatting, clean builds, and pre-push rebase.
46
+ - Added PR build, twine, and wheel smoke checks.
47
+ - Added `cdt self-update --check`, `--json`, explicit `--manager`, rate-limit errors, and `uv` support.
48
+ - Added `cdt doctor` and a getting-started guide.
49
+ - Improved pipeline YAML, unknown-step, and failed-step error messages.
50
+
51
+ ## v0.3.2 - 2026-07-07
52
+
53
+ - Fixed README install examples to point to the latest release tag.
54
+ - Hardened repository URL parsing in `cdt self-update`.
55
+ - Clarified `cdt self-update` installation-method limitations.
56
+ - Added coverage execution to the documented local command set and CI.
57
+
58
+ ## v0.3.1 - 2026-07-07
59
+
60
+ - Added `cdt self-update` command to update the CLI to the latest GitHub release via `pipx`.
61
+ - Added `cdt self-update --dry-run` to preview the available release tag and update command without executing it.
62
+ - Moved planning documents from `plans/` to `docs/plans/`.
63
+
64
+ ## v0.3.0 - 2026-07-06
65
+
66
+ - Added step metadata for built-in and plugin pipeline steps.
67
+ - Added `cdt pipeline plan <pipeline>` with JSON output and static risk classification.
68
+ - Added `cdt run <pipeline> --dry-run` as a non-executing planning preflight.
69
+ - Extended `cdt.sdk.step` decorator to accept `StepMetadata` and keyword metadata arguments.
70
+ - Refined artifact/result metadata contract: `StepMetadata` now uses structured
71
+ `ResultRequirement` and `ResultProduction` objects instead of flat
72
+ `requires_artifacts` / `produces` strings.
73
+ - `cdt pipeline plan --json` now exposes grouped `artifact_flow.requires` entries with
74
+ `types`, `mode` (`all` or `any`), and `names` inferred from static YAML options.
75
+ - Breaking: SDK/plugin authors must migrate from `requires_artifacts` and flat string
76
+ `produces` metadata to `ResultRequirement` / `ResultProduction`; CI/tools parsing
77
+ `cdt pipeline plan --json` metadata must handle the structured metadata shape.
78
+
79
+ ## v0.2.1 - 2026-07-06
80
+
81
+ - Improved the `cdt-release` Agent Skill with explicit production confirmation, structured summaries, and observability guidance.
82
+ - Added repository-level `AGENTS.md` instructions for AI agents.
83
+ - Added `.agents/rules/cdt-release.md` with hard release safety rules.
84
+ - Updated AI agent documentation and package manifest entries for agent skills/rules.
85
+ - Replaced Hermes-specific setup text with generic Agent Skills guidance.
86
+
87
+ ## v0.2.0 - 2026-07-06
88
+
89
+ - Added the `cdt-release` Agent Skill for safer AI-assisted CDT test releases.
90
+ - Removed `cdt migrate legacy` after all known projects were migrated.
91
+ - Switched release automation to YAML-only `cdt.yaml` pipelines.
92
+ - Removed legacy direct commands in favor of `cdt run <pipeline>`.
93
+ - Added `cdt migrate legacy` with dry-run, merge, backup, and force behavior.
94
+ - Added/updated built-ins: Flutter build-number increment, Android APK/AAB, iOS IPA, TestFlight upload, artifact copy, success notify, and Python hook steps.
95
+ - Build steps now use `profile` instead of `env`, do not run `flutter pub get`, and do not increment versions implicitly.
96
+ - Added artifact duplicate/missing checks, parallel error aggregation, JSON `schema_version`, and unknown-step suggestions.
97
+
98
+ ## v0.1.0 - 2026-07-03
99
+
100
+ - Initial public release of CDT.
101
+ - Includes Flutter release flows, App Store/TestFlight upload helpers, Firebase upload/deploy helpers, notifications, and trusted project-local YAML pipelines.
102
+ - Adds plugin steps through `cdt.yaml` and the `cdt.sdk.step` decorator.
@@ -0,0 +1,39 @@
1
+ # Contributing to CDT
2
+
3
+ ## Setup
4
+
5
+ ```bash
6
+ git clone https://github.com/Sergionius/cdt.git
7
+ cd cdt
8
+ python -m venv .venv
9
+ .venv/bin/python -m pip install -e '.[dev]'
10
+ ```
11
+
12
+ ## Checks
13
+
14
+ Run before opening a pull request:
15
+
16
+ ```bash
17
+ .venv/bin/ruff check .
18
+ .venv/bin/pytest -q
19
+ .venv/bin/pytest --cov=cdt --cov-report=term
20
+ .venv/bin/python -m build
21
+ .venv/bin/twine check dist/*
22
+ ```
23
+
24
+ Changes to the CLI should include tests for both readable human output and structured JSON where applicable. Release execution changes should cover failure, interruption, status persistence, and production confirmation.
25
+
26
+ ## Design expectations
27
+
28
+ - Keep `cdt run <pipeline>` simple for direct human use.
29
+ - Keep agent interfaces structured and low-noise.
30
+ - Preserve explicit, reviewable `cdt.yaml` behavior.
31
+ - Do not add network services or persistent infrastructure without a demonstrated requirement.
32
+ - Never include credentials, signing material, or real application artifacts in fixtures.
33
+ - Update README, relevant docs, examples, JSON Schema, and changelog together.
34
+
35
+ ## Pull requests
36
+
37
+ Use a short intent-based branch name such as `feature/run-history` or `fix/stale-run-status`. Keep each pull request focused and describe behavior changes, safety implications, tests, and compatibility considerations.
38
+
39
+ Report security vulnerabilities privately as described in [SECURITY.md](SECURITY.md).
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sergio Malkin
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,6 @@
1
+ include README.md LICENSE CHANGELOG.md AGENTS.md CONTRIBUTING.md SECURITY.md
2
+ include examples/cdt.yaml
3
+ recursive-include .agents *.md
4
+ recursive-include docs *.md
5
+ recursive-include examples/cdt_steps *.py
6
+ recursive-include skills *.md
@@ -0,0 +1,215 @@
1
+ Metadata-Version: 2.4
2
+ Name: cdt-release
3
+ Version: 0.4.0
4
+ Summary: Agent-first release automation CLI for mobile, web, and custom deployments
5
+ License-Expression: MIT
6
+ Project-URL: Repository, https://github.com/Sergionius/cdt
7
+ Project-URL: Documentation, https://github.com/Sergionius/cdt/tree/main/docs
8
+ Project-URL: Changelog, https://github.com/Sergionius/cdt/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/Sergionius/cdt/issues
10
+ Keywords: ai,release,deploy,cli,pipeline,automation,mobile,web,ios,android,flutter,testing,devops
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Build Tools
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: typer>=0.12
25
+ Requires-Dist: python-dotenv>=1.0.1
26
+ Requires-Dist: pyjwt[crypto]>=2.10.1
27
+ Requires-Dist: rich>=13.0.0
28
+ Requires-Dist: PyYAML>=6.0.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: build>=1.2; extra == "dev"
31
+ Requires-Dist: pytest>=8.0; extra == "dev"
32
+ Requires-Dist: pytest-cov>=6.0; extra == "dev"
33
+ Requires-Dist: ruff>=0.8; extra == "dev"
34
+ Requires-Dist: twine>=5.0; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # <img src="site/assets/logo.png" alt="" width="28">&nbsp;CDT &nbsp;[![CI](https://github.com/Sergionius/cdt/actions/workflows/ci.yml/badge.svg)](https://github.com/Sergionius/cdt/actions/workflows/ci.yml)
38
+
39
+ CDT is an agent-first release automation CLI built around project-local YAML pipelines, safe preflight checks, and reusable steps for mobile, web, and custom deployments. Direct human operation remains a first-class workflow.
40
+
41
+ CDT includes built-in steps for Flutter, native iOS/Xcode, Android, web, Firebase/AppTester, TestFlight, Python hooks, and custom steps via its SDK.
42
+
43
+ ## Installation
44
+
45
+ CDT is published as the `cdt-release` Python distribution and installs the `cdt` command. `pipx` is the recommended installation method:
46
+
47
+ ```bash
48
+ pipx install cdt-release
49
+ ```
50
+
51
+ A specific GitHub release can also be installed directly:
52
+
53
+ ```bash
54
+ pipx install "git+https://github.com/Sergionius/cdt.git@v0.4.0"
55
+ ```
56
+
57
+ Upgrade or reinstall:
58
+
59
+ ```bash
60
+ cdt self-update --check
61
+ cdt self-update --manager pipx
62
+ cdt self-update --dry-run # preview the release tag and command without running it
63
+ ```
64
+
65
+ Or manually:
66
+
67
+ ```bash
68
+ pipx uninstall cdt-release
69
+ pipx install cdt-release
70
+ ```
71
+
72
+ For local development:
73
+
74
+ ```bash
75
+ git clone https://github.com/Sergionius/cdt.git
76
+ cd cdt
77
+ python -m pip install -e '.[dev]'
78
+ # or reinstall the local checkout as a pipx CLI:
79
+ scripts/reinstall.sh
80
+ ```
81
+
82
+ `pip install cdt-release` also works, but `pipx` keeps the CLI isolated from project Python environments.
83
+
84
+ The distribution is named `cdt-release` because the `cdt` project name on PyPI belongs to another project. The installed command remains `cdt`.
85
+
86
+ ### Upgrading from CDT 0.3.x
87
+
88
+ CDT 0.3.x installed from GitHub used the distribution name `cdt`. Migrate the pipx environment once:
89
+
90
+ ```bash
91
+ pipx uninstall cdt
92
+ pipx install cdt-release
93
+ ```
94
+
95
+ Project configuration does not require migration: `cdt.yaml` version 1 remains supported, and pipeline `risk` defaults to `standard` when omitted. Existing pipeline-named agent-release status files remain readable for compatibility; new runs use `.cdt/runs/<run-id>/`.
96
+
97
+ ## Commands
98
+
99
+ ```bash
100
+ cdt --version
101
+ cdt init
102
+ cdt run <pipeline>
103
+ cdt run <pipeline> --dry-run
104
+ cdt history
105
+ cdt status <run-id>
106
+ cdt logs <run-id>
107
+ cdt pipeline list
108
+ cdt pipeline inspect <pipeline> --json
109
+ cdt pipeline plan <pipeline> --json
110
+ cdt pipeline validate [pipeline]
111
+ cdt pipeline steps
112
+ cdt schema --output cdt.schema.json
113
+ cdt doctor
114
+ cdt self-update --check
115
+ cdt self-update --manager pipx
116
+ cdt self-update --json --check
117
+ ```
118
+
119
+ Static planning commands (`cdt pipeline plan <pipeline>` and `cdt run <pipeline> --dry-run`) show the step tree, risk, warnings, and artifact flow without executing steps.
120
+
121
+ Every real run is recorded under `.cdt/runs/<run-id>/` with an atomic status file, manifest, exit code, and log location. Human operators can continue to use `cdt run test` directly; run IDs are only needed for later inspection with `cdt history`, `cdt status`, or `cdt logs`. See [Run records](docs/runs.md) for lifecycle, concurrency, retention, and recovery.
122
+
123
+ Resume status migration note: current CDT status files store stable step ids (`0`, `1`, `1/0`, `1/0/1`) instead of step names. Older name-based status files are rejected because duplicate names such as anonymous `parallel` groups are ambiguous. Recreate the status file by rerunning without `--skip-completed`, or use `cdt pipeline inspect <pipeline>` / `cdt pipeline plan <pipeline>` to map completed work to step ids manually.
124
+
125
+ `cdt self-update` updates the installed CLI to the latest GitHub release. It supports `--manager pipx`, `--manager pip`, and `--manager uv`; editable/local installs should be updated manually. Use `cdt self-update --check` to check without changing files, `--json` for machine-readable output, and `--dry-run` to see the release tag and update command without running it. The command requires outbound HTTPS access to `api.github.com`.
126
+
127
+ For a quick first run, use `cdt init` in a Flutter project and see [Getting started in 5 minutes](docs/getting-started.md). `cdt init` creates a reviewable test pipeline; it never adds uploads, credentials, or production steps automatically.
128
+
129
+ ## Minimal `cdt.yaml`
130
+
131
+ ```yaml
132
+ version: 1
133
+
134
+ pipelines:
135
+ prod:
136
+ risk: production
137
+ steps:
138
+ - flutter.increment_build_number
139
+ - flutter.pub_get
140
+ - parallel:
141
+ steps:
142
+ - sequence:
143
+ steps:
144
+ - ios.flutter_build_ipa:
145
+ profile: prod
146
+ flavor: prod
147
+ artifact: ios_ipa
148
+ - appstore.upload_testflight:
149
+ artifact: ios_ipa
150
+ changelog: prod build
151
+ - sequence:
152
+ steps:
153
+ - android.build_aab:
154
+ profile: prod
155
+ flavor: prod
156
+ artifact: android_aab
157
+ - android.build_apk:
158
+ profile: prod
159
+ flavor: prod
160
+ artifact: android_apk
161
+ - notify.prod_user_agent
162
+ - notify.success
163
+ ```
164
+
165
+ See `examples/cdt.yaml` and `docs/pipelines.md` for a fuller prod pipeline, plugins, artifacts, and hooks.
166
+
167
+ ## Release notes
168
+
169
+ See [`CHANGELOG.md`](CHANGELOG.md) for release notes.
170
+
171
+ ## Releasing
172
+
173
+ After updating versions and the changelog, push a `v*` tag (for example `v0.4.0`). GitHub Actions runs lint, tests, build, and `twine check`, publishes `cdt-release` to PyPI through trusted publishing, creates a GitHub Release, and attaches the wheel and source archive from `dist/`. Use `python scripts/release.py <version>` to prepare the release commit and annotated tag locally. Use `python scripts/release.py <version> --push` only after explicit confirmation to rebase, push the commit, and push the tag.
174
+
175
+ ## Agent-friendly automation
176
+
177
+ CDT is agent-first, not agent-only. Humans keep the direct `cdt run <pipeline>` workflow, while automation clients can use JSON planning and detached execution without parsing full build logs.
178
+
179
+ CDT ships an Agent Skill at `skills/cdt-release/SKILL.md`. It makes agents inspect `cdt.yaml`, avoid production pipelines without exact confirmation, use isolated run IDs, wait on compact status JSON, and return concise structured summaries.
180
+
181
+ Repository-level guidance lives in `AGENTS.md`; hard release safety rules live in `.agents/rules/cdt-release.md`. Agent Skills compatible clients can copy or link `skills/cdt-release/` according to their installation mechanism. See `docs/ai-agents.md` for setup and the stable automation contract.
182
+
183
+ ## Built-in steps
184
+
185
+ Use `cdt pipeline steps` for the complete list. Common built-ins:
186
+
187
+ - `flutter.increment_build_number`
188
+ - `flutter.pub_get`
189
+ - `ios.flutter_build_ipa`
190
+ - `android.build_aab`
191
+ - `android.build_apk`
192
+ - `appstore.upload_testflight`
193
+ - `artifact.copy_to_downloads`
194
+ - `hook.python_script`
195
+ - `notify.prod_user_agent`
196
+ - `notify.success`
197
+
198
+ Build steps use `profile` for CDT presets (`profile: prod` adds `--dart-define=ENV=prod`). Flutter `flavor` is separate. Build steps do not run `flutter pub get` or increment versions implicitly.
199
+
200
+ ## Python hooks
201
+
202
+ ```yaml
203
+ - hook.python_script:
204
+ script: cdt/hooks/fetch_offline_data.py
205
+ env:
206
+ OFFLINE_API_URL: ${OFFLINE_API_URL}
207
+ outputs:
208
+ - assets/offline_data.json
209
+ ```
210
+
211
+ Hooks run from the project root as `python3 <script>` and must stay inside the project root.
212
+
213
+ ## Contributing and security
214
+
215
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development checks and pull request guidance. Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md). CDT is available under the [MIT License](LICENSE).