keel-workflow 0.6.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 (82) hide show
  1. keel_workflow-0.6.0/LICENSE +201 -0
  2. keel_workflow-0.6.0/PKG-INFO +224 -0
  3. keel_workflow-0.6.0/README.md +192 -0
  4. keel_workflow-0.6.0/pyproject.toml +75 -0
  5. keel_workflow-0.6.0/setup.cfg +4 -0
  6. keel_workflow-0.6.0/src/keel/__init__.py +14 -0
  7. keel_workflow-0.6.0/src/keel/__main__.py +5 -0
  8. keel_workflow-0.6.0/src/keel/adapters/commands/ci-check.md +75 -0
  9. keel_workflow-0.6.0/src/keel/adapters/commands/coverage.md +136 -0
  10. keel_workflow-0.6.0/src/keel/adapters/commands/deps-audit.md +142 -0
  11. keel_workflow-0.6.0/src/keel/adapters/commands/flake-audit.md +157 -0
  12. keel_workflow-0.6.0/src/keel/adapters/commands/implement.md +127 -0
  13. keel_workflow-0.6.0/src/keel/adapters/commands/morning.md +100 -0
  14. keel_workflow-0.6.0/src/keel/adapters/commands/overnight.md +152 -0
  15. keel_workflow-0.6.0/src/keel/adapters/commands/pr-loop.md +181 -0
  16. keel_workflow-0.6.0/src/keel/adapters/commands/regression.md +181 -0
  17. keel_workflow-0.6.0/src/keel/adapters/commands/review-all-day.md +242 -0
  18. keel_workflow-0.6.0/src/keel/adapters/commands/review-cycle.md +205 -0
  19. keel_workflow-0.6.0/src/keel/adapters/commands/ship-v2.md +51 -0
  20. keel_workflow-0.6.0/src/keel/adapters/commands/ship.md +333 -0
  21. keel_workflow-0.6.0/src/keel/adapters/commands/stale-prs.md +142 -0
  22. keel_workflow-0.6.0/src/keel/adapters/commands/triage.md +260 -0
  23. keel_workflow-0.6.0/src/keel/adapters/commands/wrap.md +93 -0
  24. keel_workflow-0.6.0/src/keel/agents.py +89 -0
  25. keel_workflow-0.6.0/src/keel/classify.py +35 -0
  26. keel_workflow-0.6.0/src/keel/cli.py +639 -0
  27. keel_workflow-0.6.0/src/keel/config.py +206 -0
  28. keel_workflow-0.6.0/src/keel/consent.py +215 -0
  29. keel_workflow-0.6.0/src/keel/contracts.py +291 -0
  30. keel_workflow-0.6.0/src/keel/extensions.py +165 -0
  31. keel_workflow-0.6.0/src/keel/findings.py +91 -0
  32. keel_workflow-0.6.0/src/keel/gates.py +131 -0
  33. keel_workflow-0.6.0/src/keel/git.py +49 -0
  34. keel_workflow-0.6.0/src/keel/github.py +49 -0
  35. keel_workflow-0.6.0/src/keel/github_transport.py +109 -0
  36. keel_workflow-0.6.0/src/keel/install.py +293 -0
  37. keel_workflow-0.6.0/src/keel/jsonschema_min.py +138 -0
  38. keel_workflow-0.6.0/src/keel/jury.py +85 -0
  39. keel_workflow-0.6.0/src/keel/lock.py +33 -0
  40. keel_workflow-0.6.0/src/keel/model.py +129 -0
  41. keel_workflow-0.6.0/src/keel/orchestrator.py +139 -0
  42. keel_workflow-0.6.0/src/keel/project_commands.py +87 -0
  43. keel_workflow-0.6.0/src/keel/runner.py +98 -0
  44. keel_workflow-0.6.0/src/keel/runtime.py +246 -0
  45. keel_workflow-0.6.0/src/keel/scaffold.py +100 -0
  46. keel_workflow-0.6.0/src/keel/schema/project.schema.json +252 -0
  47. keel_workflow-0.6.0/src/keel/ship.py +111 -0
  48. keel_workflow-0.6.0/src/keel/window.py +39 -0
  49. keel_workflow-0.6.0/src/keel_workflow.egg-info/PKG-INFO +224 -0
  50. keel_workflow-0.6.0/src/keel_workflow.egg-info/SOURCES.txt +80 -0
  51. keel_workflow-0.6.0/src/keel_workflow.egg-info/dependency_links.txt +1 -0
  52. keel_workflow-0.6.0/src/keel_workflow.egg-info/entry_points.txt +2 -0
  53. keel_workflow-0.6.0/src/keel_workflow.egg-info/requires.txt +5 -0
  54. keel_workflow-0.6.0/src/keel_workflow.egg-info/top_level.txt +1 -0
  55. keel_workflow-0.6.0/tests/test_adapter_consent.py +56 -0
  56. keel_workflow-0.6.0/tests/test_agents.py +93 -0
  57. keel_workflow-0.6.0/tests/test_classify.py +48 -0
  58. keel_workflow-0.6.0/tests/test_cli.py +580 -0
  59. keel_workflow-0.6.0/tests/test_codex_adapter.py +76 -0
  60. keel_workflow-0.6.0/tests/test_config.py +293 -0
  61. keel_workflow-0.6.0/tests/test_consent.py +109 -0
  62. keel_workflow-0.6.0/tests/test_consolidation.py +268 -0
  63. keel_workflow-0.6.0/tests/test_consumer_neutrality.py +76 -0
  64. keel_workflow-0.6.0/tests/test_contracts.py +228 -0
  65. keel_workflow-0.6.0/tests/test_extensions.py +244 -0
  66. keel_workflow-0.6.0/tests/test_findings.py +69 -0
  67. keel_workflow-0.6.0/tests/test_gates.py +116 -0
  68. keel_workflow-0.6.0/tests/test_gitgh.py +103 -0
  69. keel_workflow-0.6.0/tests/test_github_transport.py +61 -0
  70. keel_workflow-0.6.0/tests/test_install.py +309 -0
  71. keel_workflow-0.6.0/tests/test_jsonschema_min.py +141 -0
  72. keel_workflow-0.6.0/tests/test_jury.py +106 -0
  73. keel_workflow-0.6.0/tests/test_lock.py +44 -0
  74. keel_workflow-0.6.0/tests/test_model.py +69 -0
  75. keel_workflow-0.6.0/tests/test_orchestrator.py +125 -0
  76. keel_workflow-0.6.0/tests/test_parity_matrix.py +82 -0
  77. keel_workflow-0.6.0/tests/test_project_commands.py +196 -0
  78. keel_workflow-0.6.0/tests/test_runner.py +135 -0
  79. keel_workflow-0.6.0/tests/test_runtime.py +126 -0
  80. keel_workflow-0.6.0/tests/test_scaffold.py +101 -0
  81. keel_workflow-0.6.0/tests/test_ship.py +172 -0
  82. keel_workflow-0.6.0/tests/test_window.py +66 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative
95
+ Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work, excluding
103
+ those notices that do not pertain to any part of the Derivative
104
+ Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and do
117
+ not modify the License. You may add Your own attribution notices
118
+ within Derivative Works that You distribute, alongside or as an
119
+ addendum to the NOTICE text from the Work, provided that such
120
+ additional attribution notices cannot be construed as modifying
121
+ the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Berkay Turancı
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: keel-workflow
3
+ Version: 0.6.0
4
+ Summary: Project-neutral, multi-agent workflow core: a fixed backbone of steps that drives an issue from backlog to done, customised per project via config + add-only Lego extensions.
5
+ Author-email: Berkay Turancı <berkayturanci@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://berkayturanci.github.io/keel/
8
+ Project-URL: Repository, https://github.com/berkayturanci/keel
9
+ Project-URL: Issues, https://github.com/berkayturanci/keel/issues
10
+ Project-URL: Changelog, https://github.com/berkayturanci/keel/blob/main/CHANGELOG.md
11
+ Project-URL: Documentation, https://github.com/berkayturanci/keel/tree/main/docs/keel
12
+ Keywords: workflow,automation,ci,agents,code-review,github,merge-queue
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Software Development :: Build Tools
16
+ Classifier: Topic :: Software Development :: Quality Assurance
17
+ Classifier: Topic :: Software Development :: Version Control :: Git
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: PyYAML>=6
28
+ Provides-Extra: dev
29
+ Requires-Dist: ruff; extra == "dev"
30
+ Requires-Dist: coverage; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ <picture>
34
+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/hero-light.svg">
35
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/hero.svg">
36
+ <img src="docs/assets/hero.svg" alt="keel — a fixed backbone that drives a GitHub issue from backlog to merged">
37
+ </picture>
38
+
39
+ # keel ⚓
40
+
41
+ [![CI](https://github.com/berkayturanci/keel/actions/workflows/ci.yml/badge.svg)](https://github.com/berkayturanci/keel/actions/workflows/ci.yml)
42
+ [![coverage](https://img.shields.io/endpoint?url=https://berkayturanci.github.io/keel/coverage-badge.json)](https://berkayturanci.github.io/keel/coverage/)
43
+ [![CodeQL](https://github.com/berkayturanci/keel/actions/workflows/codeql.yml/badge.svg)](https://github.com/berkayturanci/keel/actions/workflows/codeql.yml)
44
+ [![PyPI](https://img.shields.io/pypi/v/keel-workflow)](https://pypi.org/project/keel-workflow/)
45
+ [![Python](https://img.shields.io/pypi/pyversions/keel-workflow)](https://pypi.org/project/keel-workflow/)
46
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
47
+
48
+ > **keel** is a project-neutral, multi-agent **workflow core**. A *fixed backbone*
49
+ > of steps drives a unit of work — a GitHub issue — from backlog to done
50
+ > (branch → implement → CI → review → test → merge → close). Projects never fork the
51
+ > backbone: they set per-project **values** in `project.yaml` and snap their own
52
+ > **Lego pieces** into named extension slots.
53
+
54
+ The keel is a ship's backbone — the fixed spine every project builds on. The flagship
55
+ command is `keel:ship`; keel is where ships are built.
56
+
57
+ > Formerly **`ai-infra`** (a one-way file-copy sync of "portable" commands). keel replaces
58
+ > that with a thin-consumer model: the core is installed + pinned, never copied, so the
59
+ > drift/overwrite class of bug is structurally gone. Background:
60
+ > [`docs/proposals/divergence-audit-2035.md`](docs/proposals/divergence-audit-2035.md),
61
+ > [`docs/proposals/keel-architecture.md`](docs/proposals/keel-architecture.md).
62
+
63
+ ## Three layers
64
+
65
+ ```
66
+ Layer 3 EXTENSIONS project-owned Lego pieces, ADD-ONLY into named slots
67
+ Layer 2 CONFIG project.yaml — per-project values (branch, build cmd, globs, agents…)
68
+ Layer 1 BACKBONE keel-core — fixed ordered step machine + invariants (this package)
69
+ ```
70
+
71
+ Changing the backbone is a keel-core change. Projects only ever touch layers 2–3.
72
+
73
+ ### What you get
74
+
75
+ - **One backbone, every agent** — install once; `/keel:<command>` runs as native Claude commands
76
+ *and* as a single shared skill set every other agent (Codex, Antigravity, Gemini) reads.
77
+ - **Project Lego** — snap your own gates/steps into named hooks (`guard`, `tester`,
78
+ `pre-merge`, …) without forking the backbone; hard `block` gates are limited to the
79
+ documented blocking hooks.
80
+ - **Opt-in `jury` gate** — runs the [ai-jury](https://github.com/berkayturanci/ai-jury) multi-agent
81
+ reviewer on the diff when installed; a fail-soft no-op otherwise.
82
+ - **Safe merges by construction** — timezone-aware night no-merge window, `mkdir` merge lock,
83
+ risk-tier → reviewer count, hotfix bypass with an audit line, vendor+model attribution.
84
+
85
+ ### The backbone
86
+
87
+ | step | name | primary hooks | |
88
+ |---|---|---|---|
89
+ | s0 | config | `after:config` | |
90
+ | s1 | select | `before:select`, `select`, `after:select` | |
91
+ | s2 | branch | `before:branch`, `after:branch` | |
92
+ | s3 | guard | `guard` | |
93
+ | s4 | implement | `before:implement`, `after-implement` | agent |
94
+ | s5 | classify | `classify`, `after:classify` | agent |
95
+ | s6 | ci | `before:ci`, `after:ci` | |
96
+ | s7 | review | `reviewers`, `after:review` | agent |
97
+ | s8 | test | `tester`, `test`, `after:test` | |
98
+ | s9 | fixloop | `before:fixloop`, `fixloop`, `after:fixloop` | |
99
+ | s10 | merge | `pre-merge`, `after:merge` | |
100
+ | s11 | capture | `capture`, `post-merge` | |
101
+ | s12 | close | `before:close`, `on-close`, `after:close` | |
102
+
103
+ Invariants the backbone always preserves: merge lock, night no-merge window, fail-soft,
104
+ orchestrator-only-writes, vendor+model attribution.
105
+
106
+ ## Install
107
+
108
+ keel is a Python (≥3.11) package with one runtime dependency (PyYAML):
109
+
110
+ ```bash
111
+ pip install keel-workflow # from PyPI (provides the `keel` command)
112
+ pip install "git+https://github.com/berkayturanci/keel@v0.6.0" # or pin an existing git tag
113
+ ```
114
+
115
+ In a cloud agent session, install it from a `SessionStart` hook (or add keel to the
116
+ session's repo scope) so the selected core ref is available before a run.
117
+
118
+ ## Quickstart
119
+
120
+ ```bash
121
+ keel validate projects/example-flutter.yaml # validate a config against the schema
122
+ keel plan projects/example-flutter.yaml # show the backbone plan for a project
123
+ keel version
124
+ ```
125
+
126
+ `keel plan` renders the fixed backbone with each project's gates/extensions slotted in —
127
+ exactly what a dry-run executes:
128
+
129
+ ```
130
+ keel plan — example-flutter
131
+ base_branch: main core_version: ^0.6
132
+ backbone:
133
+ s4 implement [agent]
134
+ ...
135
+ s8 test
136
+ - gate: build
137
+ - gate: lint
138
+ - gate: design-parity
139
+ s10 merge
140
+ - gate: design-parity-gate
141
+ ```
142
+
143
+ ## Invocation (`/keel:<command>`)
144
+
145
+ The agentic workflows ship **with the package** as project-neutral adapters and install into
146
+ the **two surfaces** agents actually read — so the same `/keel:<command>` works in every
147
+ project; only that project's `.keel/project.yaml` + extensions change the behaviour:
148
+
149
+ ```bash
150
+ keel install-adapter claude # native Claude commands → /keel:ship, /keel:regression, …
151
+ keel install-adapter skills # one shared keel-<cmd> skill set under .agents/skills/
152
+ # (read by every non-Claude agent: Codex, Antigravity, Gemini)
153
+ keel install-adapter all # both surfaces
154
+ ```
155
+
156
+ **16 shipped commands** — `ship` (flagship), `ship-v2`, `implement`, `review-cycle`,
157
+ `review-all-day`, `pr-loop`, `regression`, `triage`, `morning`, `overnight`, `wrap`,
158
+ `ci-check`, `coverage`, `deps-audit`, `flake-audit`, `stale-prs`. Each is described in
159
+ [`docs/keel/commands.md`](docs/keel/commands.md). The `keel` CLI does the deterministic work;
160
+ the adapters are the agentic flows (per-round review, inline comments, delegation).
161
+
162
+ ## Dogfooding
163
+
164
+ keel drives **itself**: its config is `projects/keel.yaml` (Python, `make test` + `make lint`
165
+ gates) and CI runs keel on keel-core on every push —
166
+
167
+ ```bash
168
+ keel plan projects/keel.yaml # render keel's own backbone
169
+ keel run-gates projects/keel.yaml --root . # keel runs its own test + lint gates
170
+ keel ship projects/keel.yaml --root . # full dry assessment: tier, window, gates, decision
171
+ # risk tier : TIER-3 → 3 reviewer(s)
172
+ # decision : MERGE — clear to merge
173
+ ```
174
+
175
+ If a step's gate fails, keel blocks its own merge — the same backbone every consumer gets.
176
+
177
+ ## Docs
178
+
179
+ - 🌐 **Website + live coverage report** — `make site` builds the coverage HTML into
180
+ `website/coverage/` and serves the site at <http://localhost:8000>. (Publishing to GitHub
181
+ Pages is available via the manual `pages.yml` workflow once Pages is enabled.)
182
+ - [`docs/keel/configuration.md`](docs/keel/configuration.md) — `project.yaml` reference
183
+ - [`docs/keel/extensions.md`](docs/keel/extensions.md) — authoring Lego extensions
184
+ - [`docs/keel/consumer-neutrality.md`](docs/keel/consumer-neutrality.md) — core vs project policy boundary
185
+ - [`docs/keel/parity-matrix.md`](docs/keel/parity-matrix.md) — legacy-to-keel command parity status and owning issues
186
+ - [`docs/keel/runtime-capabilities.md`](docs/keel/runtime-capabilities.md) — runtime capability detection and requirement declarations
187
+ - [`docs/keel/github-transport.md`](docs/keel/github-transport.md) — GitHub transport selection and normalized operation capabilities
188
+ - [`docs/keel/command-contracts.md`](docs/keel/command-contracts.md) — structured JSON plan/result contracts for adapters
189
+ - [`docs/keel/operator-consent.md`](docs/keel/operator-consent.md) — live-run operator consent scopes and delegated-agent scope rules
190
+ - [`docs/keel/cli.md`](docs/keel/cli.md) — CLI reference
191
+ - [`docs/keel/commands.md`](docs/keel/commands.md) — the 16 `/keel:<command>` workflows, each with its description
192
+ - [`docs/keel/cutover.md`](docs/keel/cutover.md) — staged guide to retire a project's copied command bodies (install → verify → retire), losing nothing
193
+ - [`docs/keel/comparison.md`](docs/keel/comparison.md) — competitive landscape (Mergify, GitHub merge queue, Qodo/PR-Agent, CodeRabbit, Sweep, OpenHands, Danger, …) + ranked borrow-ideas
194
+ - [`docs/keel/github-actions.md`](docs/keel/github-actions.md) — run keel live on GitHub's free runner (the `keel-ship` workflow)
195
+ - [`docs/proposals/keel-architecture.md`](docs/proposals/keel-architecture.md) — full design
196
+
197
+ ## Development
198
+
199
+ Stdlib-first, pure-core + thin-I/O, deterministic, fully covered (ai-jury ethos).
200
+
201
+ ```bash
202
+ make test # offline unit suite (no network, no credentials)
203
+ make lint # ruff
204
+ make coverage # coverage gate (fail_under in pyproject)
205
+ make validate # validate every projects/*.yaml
206
+ make site # build the coverage report + serve the website at localhost:8000
207
+ ```
208
+
209
+ The pure core (`config`, `model`, `extensions`, `findings`, `gates`, `orchestrator`,
210
+ `cli`) is held at **100% line + branch coverage**; the coverage gate (`fail_under = 95`)
211
+ runs in CI.
212
+
213
+ ## Repo layout
214
+
215
+ ```
216
+ src/keel/ the core package (config, model, extensions, findings, gates, orchestrator, cli)
217
+ src/keel/schema/ project.schema.json (bundled)
218
+ projects/*.yaml example configs (example-android, example-flutter, keel)
219
+ src/keel/adapters/ the packaged /keel:<command> bodies (install-adapter: claude commands + shared skills)
220
+ adapters/ reference adapter (claude/keel-ship.md) + the adapter model (README)
221
+ website/ static site + coverage report (make site)
222
+ tests/ unit suite
223
+ docs/ docs + proposals
224
+ ```
@@ -0,0 +1,192 @@
1
+ <picture>
2
+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/hero-light.svg">
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/hero.svg">
4
+ <img src="docs/assets/hero.svg" alt="keel — a fixed backbone that drives a GitHub issue from backlog to merged">
5
+ </picture>
6
+
7
+ # keel ⚓
8
+
9
+ [![CI](https://github.com/berkayturanci/keel/actions/workflows/ci.yml/badge.svg)](https://github.com/berkayturanci/keel/actions/workflows/ci.yml)
10
+ [![coverage](https://img.shields.io/endpoint?url=https://berkayturanci.github.io/keel/coverage-badge.json)](https://berkayturanci.github.io/keel/coverage/)
11
+ [![CodeQL](https://github.com/berkayturanci/keel/actions/workflows/codeql.yml/badge.svg)](https://github.com/berkayturanci/keel/actions/workflows/codeql.yml)
12
+ [![PyPI](https://img.shields.io/pypi/v/keel-workflow)](https://pypi.org/project/keel-workflow/)
13
+ [![Python](https://img.shields.io/pypi/pyversions/keel-workflow)](https://pypi.org/project/keel-workflow/)
14
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
15
+
16
+ > **keel** is a project-neutral, multi-agent **workflow core**. A *fixed backbone*
17
+ > of steps drives a unit of work — a GitHub issue — from backlog to done
18
+ > (branch → implement → CI → review → test → merge → close). Projects never fork the
19
+ > backbone: they set per-project **values** in `project.yaml` and snap their own
20
+ > **Lego pieces** into named extension slots.
21
+
22
+ The keel is a ship's backbone — the fixed spine every project builds on. The flagship
23
+ command is `keel:ship`; keel is where ships are built.
24
+
25
+ > Formerly **`ai-infra`** (a one-way file-copy sync of "portable" commands). keel replaces
26
+ > that with a thin-consumer model: the core is installed + pinned, never copied, so the
27
+ > drift/overwrite class of bug is structurally gone. Background:
28
+ > [`docs/proposals/divergence-audit-2035.md`](docs/proposals/divergence-audit-2035.md),
29
+ > [`docs/proposals/keel-architecture.md`](docs/proposals/keel-architecture.md).
30
+
31
+ ## Three layers
32
+
33
+ ```
34
+ Layer 3 EXTENSIONS project-owned Lego pieces, ADD-ONLY into named slots
35
+ Layer 2 CONFIG project.yaml — per-project values (branch, build cmd, globs, agents…)
36
+ Layer 1 BACKBONE keel-core — fixed ordered step machine + invariants (this package)
37
+ ```
38
+
39
+ Changing the backbone is a keel-core change. Projects only ever touch layers 2–3.
40
+
41
+ ### What you get
42
+
43
+ - **One backbone, every agent** — install once; `/keel:<command>` runs as native Claude commands
44
+ *and* as a single shared skill set every other agent (Codex, Antigravity, Gemini) reads.
45
+ - **Project Lego** — snap your own gates/steps into named hooks (`guard`, `tester`,
46
+ `pre-merge`, …) without forking the backbone; hard `block` gates are limited to the
47
+ documented blocking hooks.
48
+ - **Opt-in `jury` gate** — runs the [ai-jury](https://github.com/berkayturanci/ai-jury) multi-agent
49
+ reviewer on the diff when installed; a fail-soft no-op otherwise.
50
+ - **Safe merges by construction** — timezone-aware night no-merge window, `mkdir` merge lock,
51
+ risk-tier → reviewer count, hotfix bypass with an audit line, vendor+model attribution.
52
+
53
+ ### The backbone
54
+
55
+ | step | name | primary hooks | |
56
+ |---|---|---|---|
57
+ | s0 | config | `after:config` | |
58
+ | s1 | select | `before:select`, `select`, `after:select` | |
59
+ | s2 | branch | `before:branch`, `after:branch` | |
60
+ | s3 | guard | `guard` | |
61
+ | s4 | implement | `before:implement`, `after-implement` | agent |
62
+ | s5 | classify | `classify`, `after:classify` | agent |
63
+ | s6 | ci | `before:ci`, `after:ci` | |
64
+ | s7 | review | `reviewers`, `after:review` | agent |
65
+ | s8 | test | `tester`, `test`, `after:test` | |
66
+ | s9 | fixloop | `before:fixloop`, `fixloop`, `after:fixloop` | |
67
+ | s10 | merge | `pre-merge`, `after:merge` | |
68
+ | s11 | capture | `capture`, `post-merge` | |
69
+ | s12 | close | `before:close`, `on-close`, `after:close` | |
70
+
71
+ Invariants the backbone always preserves: merge lock, night no-merge window, fail-soft,
72
+ orchestrator-only-writes, vendor+model attribution.
73
+
74
+ ## Install
75
+
76
+ keel is a Python (≥3.11) package with one runtime dependency (PyYAML):
77
+
78
+ ```bash
79
+ pip install keel-workflow # from PyPI (provides the `keel` command)
80
+ pip install "git+https://github.com/berkayturanci/keel@v0.6.0" # or pin an existing git tag
81
+ ```
82
+
83
+ In a cloud agent session, install it from a `SessionStart` hook (or add keel to the
84
+ session's repo scope) so the selected core ref is available before a run.
85
+
86
+ ## Quickstart
87
+
88
+ ```bash
89
+ keel validate projects/example-flutter.yaml # validate a config against the schema
90
+ keel plan projects/example-flutter.yaml # show the backbone plan for a project
91
+ keel version
92
+ ```
93
+
94
+ `keel plan` renders the fixed backbone with each project's gates/extensions slotted in —
95
+ exactly what a dry-run executes:
96
+
97
+ ```
98
+ keel plan — example-flutter
99
+ base_branch: main core_version: ^0.6
100
+ backbone:
101
+ s4 implement [agent]
102
+ ...
103
+ s8 test
104
+ - gate: build
105
+ - gate: lint
106
+ - gate: design-parity
107
+ s10 merge
108
+ - gate: design-parity-gate
109
+ ```
110
+
111
+ ## Invocation (`/keel:<command>`)
112
+
113
+ The agentic workflows ship **with the package** as project-neutral adapters and install into
114
+ the **two surfaces** agents actually read — so the same `/keel:<command>` works in every
115
+ project; only that project's `.keel/project.yaml` + extensions change the behaviour:
116
+
117
+ ```bash
118
+ keel install-adapter claude # native Claude commands → /keel:ship, /keel:regression, …
119
+ keel install-adapter skills # one shared keel-<cmd> skill set under .agents/skills/
120
+ # (read by every non-Claude agent: Codex, Antigravity, Gemini)
121
+ keel install-adapter all # both surfaces
122
+ ```
123
+
124
+ **16 shipped commands** — `ship` (flagship), `ship-v2`, `implement`, `review-cycle`,
125
+ `review-all-day`, `pr-loop`, `regression`, `triage`, `morning`, `overnight`, `wrap`,
126
+ `ci-check`, `coverage`, `deps-audit`, `flake-audit`, `stale-prs`. Each is described in
127
+ [`docs/keel/commands.md`](docs/keel/commands.md). The `keel` CLI does the deterministic work;
128
+ the adapters are the agentic flows (per-round review, inline comments, delegation).
129
+
130
+ ## Dogfooding
131
+
132
+ keel drives **itself**: its config is `projects/keel.yaml` (Python, `make test` + `make lint`
133
+ gates) and CI runs keel on keel-core on every push —
134
+
135
+ ```bash
136
+ keel plan projects/keel.yaml # render keel's own backbone
137
+ keel run-gates projects/keel.yaml --root . # keel runs its own test + lint gates
138
+ keel ship projects/keel.yaml --root . # full dry assessment: tier, window, gates, decision
139
+ # risk tier : TIER-3 → 3 reviewer(s)
140
+ # decision : MERGE — clear to merge
141
+ ```
142
+
143
+ If a step's gate fails, keel blocks its own merge — the same backbone every consumer gets.
144
+
145
+ ## Docs
146
+
147
+ - 🌐 **Website + live coverage report** — `make site` builds the coverage HTML into
148
+ `website/coverage/` and serves the site at <http://localhost:8000>. (Publishing to GitHub
149
+ Pages is available via the manual `pages.yml` workflow once Pages is enabled.)
150
+ - [`docs/keel/configuration.md`](docs/keel/configuration.md) — `project.yaml` reference
151
+ - [`docs/keel/extensions.md`](docs/keel/extensions.md) — authoring Lego extensions
152
+ - [`docs/keel/consumer-neutrality.md`](docs/keel/consumer-neutrality.md) — core vs project policy boundary
153
+ - [`docs/keel/parity-matrix.md`](docs/keel/parity-matrix.md) — legacy-to-keel command parity status and owning issues
154
+ - [`docs/keel/runtime-capabilities.md`](docs/keel/runtime-capabilities.md) — runtime capability detection and requirement declarations
155
+ - [`docs/keel/github-transport.md`](docs/keel/github-transport.md) — GitHub transport selection and normalized operation capabilities
156
+ - [`docs/keel/command-contracts.md`](docs/keel/command-contracts.md) — structured JSON plan/result contracts for adapters
157
+ - [`docs/keel/operator-consent.md`](docs/keel/operator-consent.md) — live-run operator consent scopes and delegated-agent scope rules
158
+ - [`docs/keel/cli.md`](docs/keel/cli.md) — CLI reference
159
+ - [`docs/keel/commands.md`](docs/keel/commands.md) — the 16 `/keel:<command>` workflows, each with its description
160
+ - [`docs/keel/cutover.md`](docs/keel/cutover.md) — staged guide to retire a project's copied command bodies (install → verify → retire), losing nothing
161
+ - [`docs/keel/comparison.md`](docs/keel/comparison.md) — competitive landscape (Mergify, GitHub merge queue, Qodo/PR-Agent, CodeRabbit, Sweep, OpenHands, Danger, …) + ranked borrow-ideas
162
+ - [`docs/keel/github-actions.md`](docs/keel/github-actions.md) — run keel live on GitHub's free runner (the `keel-ship` workflow)
163
+ - [`docs/proposals/keel-architecture.md`](docs/proposals/keel-architecture.md) — full design
164
+
165
+ ## Development
166
+
167
+ Stdlib-first, pure-core + thin-I/O, deterministic, fully covered (ai-jury ethos).
168
+
169
+ ```bash
170
+ make test # offline unit suite (no network, no credentials)
171
+ make lint # ruff
172
+ make coverage # coverage gate (fail_under in pyproject)
173
+ make validate # validate every projects/*.yaml
174
+ make site # build the coverage report + serve the website at localhost:8000
175
+ ```
176
+
177
+ The pure core (`config`, `model`, `extensions`, `findings`, `gates`, `orchestrator`,
178
+ `cli`) is held at **100% line + branch coverage**; the coverage gate (`fail_under = 95`)
179
+ runs in CI.
180
+
181
+ ## Repo layout
182
+
183
+ ```
184
+ src/keel/ the core package (config, model, extensions, findings, gates, orchestrator, cli)
185
+ src/keel/schema/ project.schema.json (bundled)
186
+ projects/*.yaml example configs (example-android, example-flutter, keel)
187
+ src/keel/adapters/ the packaged /keel:<command> bodies (install-adapter: claude commands + shared skills)
188
+ adapters/ reference adapter (claude/keel-ship.md) + the adapter model (README)
189
+ website/ static site + coverage report (make site)
190
+ tests/ unit suite
191
+ docs/ docs + proposals
192
+ ```