agentic-sdlc-system 0.1.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 (129) hide show
  1. agentic_sdlc_system-0.1.0/PKG-INFO +345 -0
  2. agentic_sdlc_system-0.1.0/README.md +319 -0
  3. agentic_sdlc_system-0.1.0/agentic_sdlc/__init__.py +14 -0
  4. agentic_sdlc_system-0.1.0/agentic_sdlc/adapters/__init__.py +24 -0
  5. agentic_sdlc_system-0.1.0/agentic_sdlc/adapters/base.py +209 -0
  6. agentic_sdlc_system-0.1.0/agentic_sdlc/adapters/claude.py +122 -0
  7. agentic_sdlc_system-0.1.0/agentic_sdlc/adapters/codex.py +116 -0
  8. agentic_sdlc_system-0.1.0/agentic_sdlc/adapters/process.py +188 -0
  9. agentic_sdlc_system-0.1.0/agentic_sdlc/agents/__init__.py +6 -0
  10. agentic_sdlc_system-0.1.0/agentic_sdlc/agents/prompts.py +251 -0
  11. agentic_sdlc_system-0.1.0/agentic_sdlc/agents/roles.py +183 -0
  12. agentic_sdlc_system-0.1.0/agentic_sdlc/build/__init__.py +18 -0
  13. agentic_sdlc_system-0.1.0/agentic_sdlc/build/accessibility.py +233 -0
  14. agentic_sdlc_system-0.1.0/agentic_sdlc/build/adr.py +235 -0
  15. agentic_sdlc_system-0.1.0/agentic_sdlc/build/android_deploy.py +195 -0
  16. agentic_sdlc_system-0.1.0/agentic_sdlc/build/android_review_rules.py +250 -0
  17. agentic_sdlc_system-0.1.0/agentic_sdlc/build/architecture_specs.py +238 -0
  18. agentic_sdlc_system-0.1.0/agentic_sdlc/build/build_adapter.py +216 -0
  19. agentic_sdlc_system-0.1.0/agentic_sdlc/build/ci_templates.py +151 -0
  20. agentic_sdlc_system-0.1.0/agentic_sdlc/build/compose_testing.py +285 -0
  21. agentic_sdlc_system-0.1.0/agentic_sdlc/build/coverage.py +221 -0
  22. agentic_sdlc_system-0.1.0/agentic_sdlc/build/device_adapter.py +482 -0
  23. agentic_sdlc_system-0.1.0/agentic_sdlc/build/emulator.py +89 -0
  24. agentic_sdlc_system-0.1.0/agentic_sdlc/build/emulator_matrix.py +276 -0
  25. agentic_sdlc_system-0.1.0/agentic_sdlc/build/emulator_snapshots.py +209 -0
  26. agentic_sdlc_system-0.1.0/agentic_sdlc/build/gradle_catalog.py +298 -0
  27. agentic_sdlc_system-0.1.0/agentic_sdlc/build/ios_adapter.py +192 -0
  28. agentic_sdlc_system-0.1.0/agentic_sdlc/build/manifest.py +61 -0
  29. agentic_sdlc_system-0.1.0/agentic_sdlc/build/performance.py +213 -0
  30. agentic_sdlc_system-0.1.0/agentic_sdlc/build/release_manager.py +250 -0
  31. agentic_sdlc_system-0.1.0/agentic_sdlc/build/robolectric.py +262 -0
  32. agentic_sdlc_system-0.1.0/agentic_sdlc/build/security.py +362 -0
  33. agentic_sdlc_system-0.1.0/agentic_sdlc/build/sprint_manager.py +305 -0
  34. agentic_sdlc_system-0.1.0/agentic_sdlc/build/versioning.py +275 -0
  35. agentic_sdlc_system-0.1.0/agentic_sdlc/build/visual_regression.py +194 -0
  36. agentic_sdlc_system-0.1.0/agentic_sdlc/chat/__init__.py +5 -0
  37. agentic_sdlc_system-0.1.0/agentic_sdlc/chat/interface.py +464 -0
  38. agentic_sdlc_system-0.1.0/agentic_sdlc/cli.py +475 -0
  39. agentic_sdlc_system-0.1.0/agentic_sdlc/config.py +46 -0
  40. agentic_sdlc_system-0.1.0/agentic_sdlc/doctor.py +142 -0
  41. agentic_sdlc_system-0.1.0/agentic_sdlc/feedback/__init__.py +22 -0
  42. agentic_sdlc_system-0.1.0/agentic_sdlc/feedback/acceptance.py +71 -0
  43. agentic_sdlc_system-0.1.0/agentic_sdlc/feedback/intake.py +131 -0
  44. agentic_sdlc_system-0.1.0/agentic_sdlc/git_ops/__init__.py +18 -0
  45. agentic_sdlc_system-0.1.0/agentic_sdlc/git_ops/github.py +174 -0
  46. agentic_sdlc_system-0.1.0/agentic_sdlc/git_ops/worktree.py +177 -0
  47. agentic_sdlc_system-0.1.0/agentic_sdlc/memory/__init__.py +17 -0
  48. agentic_sdlc_system-0.1.0/agentic_sdlc/memory/layers.py +224 -0
  49. agentic_sdlc_system-0.1.0/agentic_sdlc/memory/reflection.py +192 -0
  50. agentic_sdlc_system-0.1.0/agentic_sdlc/onboard/__init__.py +6 -0
  51. agentic_sdlc_system-0.1.0/agentic_sdlc/onboard/scanner.py +588 -0
  52. agentic_sdlc_system-0.1.0/agentic_sdlc/onboard/wizard.py +303 -0
  53. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/arch_reviewer.md +35 -0
  54. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/architect.md +52 -0
  55. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/classifier.md +25 -0
  56. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/codebase_analyst.md +31 -0
  57. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/deployer.md +36 -0
  58. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/developer.md +21 -0
  59. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/po_reviewer.md +30 -0
  60. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/product_owner.md +34 -0
  61. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/qa_classifier.md +34 -0
  62. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/qa_test_author.md +17 -0
  63. agentic_sdlc_system-0.1.0/agentic_sdlc/prompts/reviewer.md +29 -0
  64. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/__init__.py +34 -0
  65. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/api_anthropic.py +248 -0
  66. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/api_apply.py +303 -0
  67. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/api_openai.py +290 -0
  68. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/base.py +190 -0
  69. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/cli_claude.py +150 -0
  70. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/cli_codex.py +155 -0
  71. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/cli_copilot.py +127 -0
  72. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/cli_cursor.py +161 -0
  73. agentic_sdlc_system-0.1.0/agentic_sdlc/providers/registry.py +268 -0
  74. agentic_sdlc_system-0.1.0/agentic_sdlc/rag/__init__.py +23 -0
  75. agentic_sdlc_system-0.1.0/agentic_sdlc/rag/collections.py +211 -0
  76. agentic_sdlc_system-0.1.0/agentic_sdlc/rag/embeddings.py +82 -0
  77. agentic_sdlc_system-0.1.0/agentic_sdlc/rag/indexers.py +241 -0
  78. agentic_sdlc_system-0.1.0/agentic_sdlc/rag/retriever.py +231 -0
  79. agentic_sdlc_system-0.1.0/agentic_sdlc/reporting.py +74 -0
  80. agentic_sdlc_system-0.1.0/agentic_sdlc/runner/__init__.py +5 -0
  81. agentic_sdlc_system-0.1.0/agentic_sdlc/runner/test_runner.py +206 -0
  82. agentic_sdlc_system-0.1.0/agentic_sdlc/scaffold.py +165 -0
  83. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/__init__.py +82 -0
  84. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/build.py +179 -0
  85. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/config.py +367 -0
  86. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/enums.py +161 -0
  87. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/feedback.py +86 -0
  88. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/findings.py +87 -0
  89. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/results.py +104 -0
  90. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/state.py +270 -0
  91. agentic_sdlc_system-0.1.0/agentic_sdlc/schemas/task.py +51 -0
  92. agentic_sdlc_system-0.1.0/agentic_sdlc/stack/__init__.py +9 -0
  93. agentic_sdlc_system-0.1.0/agentic_sdlc/stack/advisor.py +372 -0
  94. agentic_sdlc_system-0.1.0/agentic_sdlc/stack/templates.py +388 -0
  95. agentic_sdlc_system-0.1.0/agentic_sdlc/store/__init__.py +6 -0
  96. agentic_sdlc_system-0.1.0/agentic_sdlc/store/artifacts.py +57 -0
  97. agentic_sdlc_system-0.1.0/agentic_sdlc/store/journal.py +153 -0
  98. agentic_sdlc_system-0.1.0/agentic_sdlc/util.py +91 -0
  99. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/__init__.py +23 -0
  100. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/build_node.py +162 -0
  101. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/controller.py +229 -0
  102. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/deploy_node.py +287 -0
  103. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/github_integration.py +334 -0
  104. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/graph.py +217 -0
  105. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/nodes.py +1548 -0
  106. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/planning_nodes.py +308 -0
  107. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/router.py +134 -0
  108. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/sandbox.py +418 -0
  109. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/services.py +89 -0
  110. agentic_sdlc_system-0.1.0/agentic_sdlc/workflow/watcher.py +122 -0
  111. agentic_sdlc_system-0.1.0/agentic_sdlc_system.egg-info/PKG-INFO +345 -0
  112. agentic_sdlc_system-0.1.0/agentic_sdlc_system.egg-info/SOURCES.txt +127 -0
  113. agentic_sdlc_system-0.1.0/agentic_sdlc_system.egg-info/dependency_links.txt +1 -0
  114. agentic_sdlc_system-0.1.0/agentic_sdlc_system.egg-info/entry_points.txt +2 -0
  115. agentic_sdlc_system-0.1.0/agentic_sdlc_system.egg-info/requires.txt +12 -0
  116. agentic_sdlc_system-0.1.0/agentic_sdlc_system.egg-info/top_level.txt +1 -0
  117. agentic_sdlc_system-0.1.0/pyproject.toml +50 -0
  118. agentic_sdlc_system-0.1.0/setup.cfg +4 -0
  119. agentic_sdlc_system-0.1.0/tests/test_e2e_smoke.py +429 -0
  120. agentic_sdlc_system-0.1.0/tests/test_mobile.py +73 -0
  121. agentic_sdlc_system-0.1.0/tests/test_phase5_rag_memory.py +406 -0
  122. agentic_sdlc_system-0.1.0/tests/test_phase6_build_deploy_github.py +387 -0
  123. agentic_sdlc_system-0.1.0/tests/test_phase7_integration.py +346 -0
  124. agentic_sdlc_system-0.1.0/tests/test_publish.py +100 -0
  125. agentic_sdlc_system-0.1.0/tests/test_resume.py +63 -0
  126. agentic_sdlc_system-0.1.0/tests/test_sandbox_enforcement.py +423 -0
  127. agentic_sdlc_system-0.1.0/tests/test_test_runner.py +48 -0
  128. agentic_sdlc_system-0.1.0/tests/test_units.py +706 -0
  129. agentic_sdlc_system-0.1.0/tests/test_workflow.py +146 -0
@@ -0,0 +1,345 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentic-sdlc-system
3
+ Version: 0.1.0
4
+ Summary: A reusable local orchestrator that coordinates Codex and Claude Code through an end-to-end agentic SDLC: implement, review, test, repair, build, install on a phone, and collect human feedback.
5
+ Author: Ravi Shankar Kumar
6
+ License-Expression: MIT
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Topic :: Software Development :: Quality Assurance
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: langgraph<0.3,>=0.2.50
17
+ Requires-Dist: langgraph-checkpoint-sqlite<3,>=2.0
18
+ Requires-Dist: pydantic<3,>=2.9
19
+ Requires-Dist: pyyaml<7,>=6
20
+ Requires-Dist: typing-extensions>=4.10
21
+ Provides-Extra: rag
22
+ Requires-Dist: chromadb<1,>=0.5; extra == "rag"
23
+ Requires-Dist: sentence-transformers<4,>=3.0; extra == "rag"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest<9,>=8; extra == "dev"
26
+
27
+ # Agentic SDLC
28
+
29
+ A reusable, **local-first** orchestrator that coordinates the **Codex CLI** and the
30
+ **Claude Code CLI** — through their existing subscription-authenticated runtimes —
31
+ to drive a software change end to end:
32
+
33
+ > implement → independent review → repair → regression tests → classify failures →
34
+ > repair → final verification → (mobile) build → install on your phone → you test →
35
+ > your feedback → repair → re-deliver → you accept.
36
+
37
+ The orchestrator is its **own project and Git repository**. It never edits a target
38
+ app's original checkout; each task runs in an isolated Git **worktree** on a feature
39
+ branch. The same controller drives different target apps through configuration.
40
+
41
+ - **Workflow engine:** Python + [LangGraph](https://langchain-ai.github.io/langgraph/) with a SQLite checkpointer.
42
+ - **Workers:** the real `codex` and `claude` CLIs via supervised adapters (not generic API agents). Your subscriptions are used; no API keys are introduced.
43
+ - **Deterministic controller:** Git/GitHub, test execution, evidence, build/device delivery, and all routing are plain Python. No extra supervisor LLM.
44
+
45
+ ---
46
+
47
+ ## 1. Requirements
48
+
49
+ Run `agentic-sdlc doctor` after install. You need:
50
+
51
+ | Tool | Why |
52
+ |------|-----|
53
+ | Python ≥ 3.10 | the orchestrator |
54
+ | `git` | worktrees, commits |
55
+ | `codex` CLI (authenticated) | developer / fixer |
56
+ | `claude` CLI (authenticated) | reviewer / QA |
57
+ | `gh` CLI (authenticated) | **publish mode** only (PRs, issues, comments) |
58
+ | `adb` + Android SDK platform-tools | **mobile Android** runs only |
59
+
60
+ The orchestrator **does not** introduce `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` or any
61
+ separately billed model route. Worker processes are launched with a controlled
62
+ environment that strips those keys so the subscription-authenticated CLIs are used.
63
+ If a provider rejects a model, auth expires, or usage is exhausted, the run **saves
64
+ state and stops** with an actionable message — it never silently switches billing.
65
+
66
+ ## 2. Install
67
+
68
+ ### From GitHub (recommended)
69
+
70
+ ```bash
71
+ pip install git+https://github.com/rsk-iitj/agentic-sdlc.git
72
+ agentic-sdlc doctor
73
+ ```
74
+
75
+ ### From source (development)
76
+
77
+ ```bash
78
+ git clone https://github.com/rsk-iitj/agentic-sdlc.git
79
+ cd agentic-sdlc
80
+ python -m venv .venv && . .venv/bin/activate
81
+ pip install -e ".[dev]"
82
+ agentic-sdlc doctor
83
+ ```
84
+
85
+ ### From wheel
86
+
87
+ Pre-built wheels are in `dist/`. Install directly:
88
+
89
+ ```bash
90
+ pip install agentic_sdlc-0.1.0-py3-none-any.whl
91
+ ```
92
+
93
+ ### Docker
94
+
95
+ ```bash
96
+ docker build -t agentic-sdlc .
97
+ docker run --rm agentic-sdlc doctor
98
+ ```
99
+
100
+ For a full run, mount your target project and pass config:
101
+
102
+ ```bash
103
+ docker run --rm -v /path/to/your-app:/app/target \
104
+ agentic-sdlc run --project /app/target/project.yaml --task /app/target/task.yaml
105
+ ```
106
+
107
+ ## 3. Configure a target project
108
+
109
+ ```bash
110
+ agentic-sdlc init --dir ./myconfig
111
+ ```
112
+
113
+ This writes `project.example.yaml`, `task.example.yaml`, `feedback.example.yaml`, and
114
+ GitHub issue templates under `github_templates/`. Edit `project.example.yaml`:
115
+
116
+ ```yaml
117
+ project_id: your-app
118
+ repo_path: /home/you/projects/your-app # the TARGET app checkout
119
+ mode: local # local (demo) | publish (live GitHub)
120
+ required_test_commands: # MUST pass (exit 0 + real evidence)
121
+ - "python -m pytest -q --junitxml=agentic-junit.xml"
122
+ test_support_paths: ["tests/"] # QA may add/change tests ONLY here
123
+ is_mobile: false
124
+ github:
125
+ repo: owner/your-app # required for publish mode
126
+ controller_login: your-bot-login
127
+ authorized_reporters: [your-gh-login]
128
+ authorized_controllers: [your-gh-login]
129
+ models:
130
+ developer: { model: gpt-6.2-sol, effort: high, escalation_model: gpt-6.2-astra }
131
+ reviewer: { model: opus, effort: high }
132
+ qa: { model: sonnet, effort: medium, escalation_model: opus }
133
+ repair_budget: 3
134
+ ```
135
+
136
+ > **Trusted config only.** Setup/test/build/launch/smoke commands are read **only**
137
+ > from this user-approved file — never from issue text, PR comments, or worker output.
138
+
139
+ Model IDs, effort, timeouts, and permissions are **configurable starting choices**.
140
+ Verify the flags against your installed CLI versions; the run records the resolved
141
+ model when the CLI exposes it.
142
+
143
+ ## 4. Run a task
144
+
145
+ ```bash
146
+ agentic-sdlc run --project project.example.yaml --task task.example.yaml
147
+ ```
148
+
149
+ - **local mode** performs no external publication and says so.
150
+ - **publish mode** opens one **draft** PR and posts review/delivery updates.
151
+
152
+ Then inspect / drive the run:
153
+
154
+ ```bash
155
+ agentic-sdlc status <run-id>
156
+ agentic-sdlc resume <run-id>
157
+ agentic-sdlc cancel <run-id>
158
+ ```
159
+
160
+ ### Demo without spending subscription usage
161
+
162
+ Every command accepts fake workers so you can exercise the whole pipeline offline:
163
+
164
+ ```bash
165
+ agentic-sdlc run --project project.example.yaml --task task.example.yaml \
166
+ --fake-workers examples/fake_workers --fake-home /tmp/fake-plan \
167
+ --simulate-device
168
+ ```
169
+
170
+ The banner on each run states whether it is using **REAL subscription-backed agents**
171
+ or **FAKE test workers**.
172
+
173
+ ## 5. The workflow and its gates
174
+
175
+ | Phase | What happens |
176
+ |-------|--------------|
177
+ | intake / baseline | detect base branch, create worktree+branch, run setup, record pre-existing failures |
178
+ | implement | Codex implements; controller commits |
179
+ | review ↔ repair | Claude reviews the exact candidate (read-only); blocking findings route to Codex; re-review the new revision |
180
+ | test authoring | Claude adds regression tests under permitted paths (distinct commit) |
181
+ | test execution → classify | controller runs required checks on real evidence; failures are classified |
182
+ | repair / test correction | product defects → Codex; invalid tests → QA correction |
183
+ | final verification | re-review + re-run required checks **on the final revision**; an earlier clean gate never approves a newer commit |
184
+ | build / install | (mobile) build the recorded candidate, install + launch + smoke on the configured phone |
185
+
186
+ **A candidate passes automated gates only when:** required checks pass with real
187
+ execution evidence (exit 0 + parsed report/summary, and never zero required tests),
188
+ accepted blocking findings are resolved, and the working tree is consistent. An agent
189
+ saying "all tests passed" is never sufficient.
190
+
191
+ **Statuses:** `RUNNING, BUILDING, WAITING_FOR_DEVICE, INSTALLING, AWAITING_USER_TEST,
192
+ READY_FOR_REVIEW, BLOCKED, FAILED, CANCELLED, PAUSED_FOR_USAGE, COMPLETED`.
193
+ Waiting states persist with **no active model call or polling loop**; `status` shows
194
+ the exact resume/retest command.
195
+
196
+ **Repair budget:** one shared budget (default 3 rounds) across review, test repair,
197
+ build repair, and user-reported defects. Waiting for the phone or your feedback does
198
+ **not** consume a round; later feedback does not reset an exhausted budget.
199
+
200
+ ## 6. Mobile: build, install, and phone testing
201
+
202
+ Set `is_mobile: true` and a `device:` block (see `init` output). On Ubuntu, Android
203
+ is the direct local route: the configured toolchain builds an installable **APK**
204
+ (App Bundles are rejected as not directly installable), then `adb` installs it on the
205
+ **explicitly configured** device serial (never an arbitrary phone when several attach).
206
+
207
+ The device worker:
208
+
209
+ - records a build manifest: build id, source SHA, variant, config fingerprint,
210
+ toolchain versions, artifact path + SHA-256, app id, version, backend identity;
211
+ - verifies the installed identity as far as the platform exposes it (ambiguous →
212
+ reported as an *unverified delivery*, not success);
213
+ - **never** silently uninstalls, clears data, downgrades, or bypasses platform
214
+ security to force an install through — it reports the problem for a deliberate
215
+ decision;
216
+ - distinguishes build / install / launch / smoke / manual-acceptance;
217
+ - treats a missing/unauthorized phone as `WAITING_FOR_DEVICE` (artifact preserved),
218
+ not a product defect and not a success.
219
+
220
+ Native **iOS** builds require a configured Mac with Xcode + signing; Ubuntu alone
221
+ cannot produce or install them. The controller stays on Ubuntu and reports the
222
+ concrete integration blocker rather than pretending.
223
+
224
+ ### Phone-friendly feedback (GitHub)
225
+
226
+ The primary interface is **GitHub Issues** in the *target app* repo plus authorized
227
+ issue/PR comments, so you can drive the loop from a phone browser. Copy the GitHub
228
+ templates from `github_templates/` into your app repo's `.github/ISSUE_TEMPLATE/`
229
+ through your normal review/merge (issue forms only activate once on the default
230
+ branch).
231
+
232
+ Run the watcher (publish mode):
233
+
234
+ ```bash
235
+ agentic-sdlc watch --project project.example.yaml
236
+ ```
237
+
238
+ It polls queued issues and relevant comments with backoff and durable dedup, acting
239
+ only on **configured authorized identities**. Issue text is treated as evidence,
240
+ never as permission to run commands. Documented comment commands:
241
+
242
+ ```
243
+ /sdlc retest <build-id> pass # verifies that one defect on that build
244
+ /sdlc retest <build-id> fail # re-opens investigation (attach steps)
245
+ /sdlc accept <build-id> # accept the whole candidate (does NOT merge)
246
+ ```
247
+
248
+ A passed retest verifies one defect on one build; it is **not** overall acceptance,
249
+ and neither acceptance nor a passed retest merges the PR. A new candidate or material
250
+ build/environment change **invalidates** previous acceptance. The equivalent local
251
+ commands share the same state:
252
+
253
+ ```bash
254
+ agentic-sdlc install <run-id> --build <build-id>
255
+ agentic-sdlc feedback <run-id> --build <build-id> --file feedback.yaml
256
+ agentic-sdlc accept <run-id> --build <build-id>
257
+ agentic-sdlc devices --project project.example.yaml
258
+ ```
259
+
260
+ ## 7. Safety, recovery, and idempotency
261
+
262
+ - **One writer per worktree** (a pid-checked lock). A second writer is refused.
263
+ - **No destructive Git.** One feature branch + one PR per task; never force-push,
264
+ never reset/modify the base branch. The repo's real default branch is honored.
265
+ - **Idempotent publication.** PR/issue/comment writes are journaled with stable
266
+ operation keys and hidden markers; an uncertain response is reconciled before any
267
+ retry, so a restart never creates duplicates. Defects reuse a stable fingerprint →
268
+ one canonical issue across revisions.
269
+ - **Resume reconciles reality**, not just the checkpoint: it syncs the actual
270
+ worktree HEAD, and if an interrupted worker left uncommitted changes it preserves
271
+ them and asks for a deliberate recovery decision instead of re-running a coding
272
+ phase over partial edits. It will not overwrite an active manual-testing session.
273
+ - Workers run in their own **process group** with bounded timeouts; cancellation stops
274
+ owned children only. Secrets are redacted from logs; large logs are artifacts
275
+ referenced from state, never inlined.
276
+
277
+ ## 8. What is verified (honestly)
278
+
279
+ - **Fully exercised with fake worker executables + real tooling** (real `git`
280
+ worktrees, real `pytest` execution, in-memory GitHub/device boundaries): the entire
281
+ pipeline and the recovery/idempotency behaviors. Run the suite:
282
+
283
+ ```bash
284
+ pip install -e ".[dev]" && pytest
285
+ ```
286
+
287
+ 29 tests cover the acceptance criteria (happy path, review→repair, product-defect
288
+ classification + fix, invalid-test correction, budget exhaustion, scope violations,
289
+ evidence gates, mobile delivery + acceptance, acceptance invalidation, idempotent
290
+ publication, authorized/deduped comment commands, pause→resume, resume recovery).
291
+
292
+ - **Real CLI adapters** are built against the installed `codex 0.167.x` and
293
+ `claude 2.1.x` flags (`codex exec --json --output-schema -o`; `claude -p
294
+ --output-format json --json-schema --session-id`). A **real subscription-backed
295
+ smoke test is not run automatically** because it spends your usage and needs a
296
+ target repo; enable it deliberately once a target app is connected (Milestone 5).
297
+
298
+ - The `--simulate-device` adapter is **clearly labeled simulated** and never
299
+ represented as a physical phone installation.
300
+
301
+ ## 9. First real integration (what's needed)
302
+
303
+ To connect your real app and phone:
304
+
305
+ 1. Point `repo_path` at the app; set `required_test_commands` to its real checks.
306
+ 2. For mobile: set `is_mobile: true`, the `device:` block (platform, **adb serial**,
307
+ `build_command`, `artifact_glob`, `application_id`, `launch_activity`), and connect
308
+ + authorize the phone (`agentic-sdlc devices` to find the serial).
309
+ 3. For publish: set `mode: publish`, `github.repo`, authorized identities, and copy
310
+ the issue templates into the app repo.
311
+ 4. Run a small, reversible task first.
312
+
313
+ Still needed from you for a live mobile run: the **target repo path/remote**, the
314
+ **phone platform** (Android works locally; iOS needs a Mac worker), and the **device
315
+ serial**.
316
+
317
+ ## 10. Scope
318
+
319
+ In scope: local orchestration, review/test/repair loops, mobile dev build + install +
320
+ manual acceptance, GitHub bug intake. Out of scope (first version): automatic merge,
321
+ production deployment, app-store release, dashboards, RAG/vector DBs, hosted services.
322
+ **You** make the merge decision.
323
+
324
+ ## Project layout
325
+
326
+ ```
327
+ agentic_sdlc/
328
+ schemas/ validated models for every control signal + the RunState
329
+ adapters/ process supervision + real Codex/Claude CLI adapters
330
+ git_ops/ worktree isolation + idempotent GitHub ops
331
+ runner/ test execution + evidence parsing
332
+ rag/ per-role RAG retrieval strategies
333
+ build/ build + device adapters + Android pipeline modules:
334
+ robolectric, compose_testing, architecture_specs,
335
+ adr, emulator_matrix, emulator_snapshots,
336
+ release_manager, sprint_manager, gradle_catalog,
337
+ security_scanner, deploy, coverage, performance
338
+ feedback/ GitHub intake (auth, dedup, /sdlc commands) + acceptance
339
+ workflow/ LangGraph 19-node graph, engine nodes, sandbox, controller
340
+ prompts/ role prompts (developer, reviewer, QA, classifier)
341
+ cli.py the agentic-sdlc command line
342
+ examples/ starter configs, GitHub templates, fake workers
343
+ tests/ 218 tests covering the full pipeline
344
+ Dockerfile containerized distribution
345
+ ```
@@ -0,0 +1,319 @@
1
+ # Agentic SDLC
2
+
3
+ A reusable, **local-first** orchestrator that coordinates the **Codex CLI** and the
4
+ **Claude Code CLI** — through their existing subscription-authenticated runtimes —
5
+ to drive a software change end to end:
6
+
7
+ > implement → independent review → repair → regression tests → classify failures →
8
+ > repair → final verification → (mobile) build → install on your phone → you test →
9
+ > your feedback → repair → re-deliver → you accept.
10
+
11
+ The orchestrator is its **own project and Git repository**. It never edits a target
12
+ app's original checkout; each task runs in an isolated Git **worktree** on a feature
13
+ branch. The same controller drives different target apps through configuration.
14
+
15
+ - **Workflow engine:** Python + [LangGraph](https://langchain-ai.github.io/langgraph/) with a SQLite checkpointer.
16
+ - **Workers:** the real `codex` and `claude` CLIs via supervised adapters (not generic API agents). Your subscriptions are used; no API keys are introduced.
17
+ - **Deterministic controller:** Git/GitHub, test execution, evidence, build/device delivery, and all routing are plain Python. No extra supervisor LLM.
18
+
19
+ ---
20
+
21
+ ## 1. Requirements
22
+
23
+ Run `agentic-sdlc doctor` after install. You need:
24
+
25
+ | Tool | Why |
26
+ |------|-----|
27
+ | Python ≥ 3.10 | the orchestrator |
28
+ | `git` | worktrees, commits |
29
+ | `codex` CLI (authenticated) | developer / fixer |
30
+ | `claude` CLI (authenticated) | reviewer / QA |
31
+ | `gh` CLI (authenticated) | **publish mode** only (PRs, issues, comments) |
32
+ | `adb` + Android SDK platform-tools | **mobile Android** runs only |
33
+
34
+ The orchestrator **does not** introduce `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` or any
35
+ separately billed model route. Worker processes are launched with a controlled
36
+ environment that strips those keys so the subscription-authenticated CLIs are used.
37
+ If a provider rejects a model, auth expires, or usage is exhausted, the run **saves
38
+ state and stops** with an actionable message — it never silently switches billing.
39
+
40
+ ## 2. Install
41
+
42
+ ### From GitHub (recommended)
43
+
44
+ ```bash
45
+ pip install git+https://github.com/rsk-iitj/agentic-sdlc.git
46
+ agentic-sdlc doctor
47
+ ```
48
+
49
+ ### From source (development)
50
+
51
+ ```bash
52
+ git clone https://github.com/rsk-iitj/agentic-sdlc.git
53
+ cd agentic-sdlc
54
+ python -m venv .venv && . .venv/bin/activate
55
+ pip install -e ".[dev]"
56
+ agentic-sdlc doctor
57
+ ```
58
+
59
+ ### From wheel
60
+
61
+ Pre-built wheels are in `dist/`. Install directly:
62
+
63
+ ```bash
64
+ pip install agentic_sdlc-0.1.0-py3-none-any.whl
65
+ ```
66
+
67
+ ### Docker
68
+
69
+ ```bash
70
+ docker build -t agentic-sdlc .
71
+ docker run --rm agentic-sdlc doctor
72
+ ```
73
+
74
+ For a full run, mount your target project and pass config:
75
+
76
+ ```bash
77
+ docker run --rm -v /path/to/your-app:/app/target \
78
+ agentic-sdlc run --project /app/target/project.yaml --task /app/target/task.yaml
79
+ ```
80
+
81
+ ## 3. Configure a target project
82
+
83
+ ```bash
84
+ agentic-sdlc init --dir ./myconfig
85
+ ```
86
+
87
+ This writes `project.example.yaml`, `task.example.yaml`, `feedback.example.yaml`, and
88
+ GitHub issue templates under `github_templates/`. Edit `project.example.yaml`:
89
+
90
+ ```yaml
91
+ project_id: your-app
92
+ repo_path: /home/you/projects/your-app # the TARGET app checkout
93
+ mode: local # local (demo) | publish (live GitHub)
94
+ required_test_commands: # MUST pass (exit 0 + real evidence)
95
+ - "python -m pytest -q --junitxml=agentic-junit.xml"
96
+ test_support_paths: ["tests/"] # QA may add/change tests ONLY here
97
+ is_mobile: false
98
+ github:
99
+ repo: owner/your-app # required for publish mode
100
+ controller_login: your-bot-login
101
+ authorized_reporters: [your-gh-login]
102
+ authorized_controllers: [your-gh-login]
103
+ models:
104
+ developer: { model: gpt-6.2-sol, effort: high, escalation_model: gpt-6.2-astra }
105
+ reviewer: { model: opus, effort: high }
106
+ qa: { model: sonnet, effort: medium, escalation_model: opus }
107
+ repair_budget: 3
108
+ ```
109
+
110
+ > **Trusted config only.** Setup/test/build/launch/smoke commands are read **only**
111
+ > from this user-approved file — never from issue text, PR comments, or worker output.
112
+
113
+ Model IDs, effort, timeouts, and permissions are **configurable starting choices**.
114
+ Verify the flags against your installed CLI versions; the run records the resolved
115
+ model when the CLI exposes it.
116
+
117
+ ## 4. Run a task
118
+
119
+ ```bash
120
+ agentic-sdlc run --project project.example.yaml --task task.example.yaml
121
+ ```
122
+
123
+ - **local mode** performs no external publication and says so.
124
+ - **publish mode** opens one **draft** PR and posts review/delivery updates.
125
+
126
+ Then inspect / drive the run:
127
+
128
+ ```bash
129
+ agentic-sdlc status <run-id>
130
+ agentic-sdlc resume <run-id>
131
+ agentic-sdlc cancel <run-id>
132
+ ```
133
+
134
+ ### Demo without spending subscription usage
135
+
136
+ Every command accepts fake workers so you can exercise the whole pipeline offline:
137
+
138
+ ```bash
139
+ agentic-sdlc run --project project.example.yaml --task task.example.yaml \
140
+ --fake-workers examples/fake_workers --fake-home /tmp/fake-plan \
141
+ --simulate-device
142
+ ```
143
+
144
+ The banner on each run states whether it is using **REAL subscription-backed agents**
145
+ or **FAKE test workers**.
146
+
147
+ ## 5. The workflow and its gates
148
+
149
+ | Phase | What happens |
150
+ |-------|--------------|
151
+ | intake / baseline | detect base branch, create worktree+branch, run setup, record pre-existing failures |
152
+ | implement | Codex implements; controller commits |
153
+ | review ↔ repair | Claude reviews the exact candidate (read-only); blocking findings route to Codex; re-review the new revision |
154
+ | test authoring | Claude adds regression tests under permitted paths (distinct commit) |
155
+ | test execution → classify | controller runs required checks on real evidence; failures are classified |
156
+ | repair / test correction | product defects → Codex; invalid tests → QA correction |
157
+ | final verification | re-review + re-run required checks **on the final revision**; an earlier clean gate never approves a newer commit |
158
+ | build / install | (mobile) build the recorded candidate, install + launch + smoke on the configured phone |
159
+
160
+ **A candidate passes automated gates only when:** required checks pass with real
161
+ execution evidence (exit 0 + parsed report/summary, and never zero required tests),
162
+ accepted blocking findings are resolved, and the working tree is consistent. An agent
163
+ saying "all tests passed" is never sufficient.
164
+
165
+ **Statuses:** `RUNNING, BUILDING, WAITING_FOR_DEVICE, INSTALLING, AWAITING_USER_TEST,
166
+ READY_FOR_REVIEW, BLOCKED, FAILED, CANCELLED, PAUSED_FOR_USAGE, COMPLETED`.
167
+ Waiting states persist with **no active model call or polling loop**; `status` shows
168
+ the exact resume/retest command.
169
+
170
+ **Repair budget:** one shared budget (default 3 rounds) across review, test repair,
171
+ build repair, and user-reported defects. Waiting for the phone or your feedback does
172
+ **not** consume a round; later feedback does not reset an exhausted budget.
173
+
174
+ ## 6. Mobile: build, install, and phone testing
175
+
176
+ Set `is_mobile: true` and a `device:` block (see `init` output). On Ubuntu, Android
177
+ is the direct local route: the configured toolchain builds an installable **APK**
178
+ (App Bundles are rejected as not directly installable), then `adb` installs it on the
179
+ **explicitly configured** device serial (never an arbitrary phone when several attach).
180
+
181
+ The device worker:
182
+
183
+ - records a build manifest: build id, source SHA, variant, config fingerprint,
184
+ toolchain versions, artifact path + SHA-256, app id, version, backend identity;
185
+ - verifies the installed identity as far as the platform exposes it (ambiguous →
186
+ reported as an *unverified delivery*, not success);
187
+ - **never** silently uninstalls, clears data, downgrades, or bypasses platform
188
+ security to force an install through — it reports the problem for a deliberate
189
+ decision;
190
+ - distinguishes build / install / launch / smoke / manual-acceptance;
191
+ - treats a missing/unauthorized phone as `WAITING_FOR_DEVICE` (artifact preserved),
192
+ not a product defect and not a success.
193
+
194
+ Native **iOS** builds require a configured Mac with Xcode + signing; Ubuntu alone
195
+ cannot produce or install them. The controller stays on Ubuntu and reports the
196
+ concrete integration blocker rather than pretending.
197
+
198
+ ### Phone-friendly feedback (GitHub)
199
+
200
+ The primary interface is **GitHub Issues** in the *target app* repo plus authorized
201
+ issue/PR comments, so you can drive the loop from a phone browser. Copy the GitHub
202
+ templates from `github_templates/` into your app repo's `.github/ISSUE_TEMPLATE/`
203
+ through your normal review/merge (issue forms only activate once on the default
204
+ branch).
205
+
206
+ Run the watcher (publish mode):
207
+
208
+ ```bash
209
+ agentic-sdlc watch --project project.example.yaml
210
+ ```
211
+
212
+ It polls queued issues and relevant comments with backoff and durable dedup, acting
213
+ only on **configured authorized identities**. Issue text is treated as evidence,
214
+ never as permission to run commands. Documented comment commands:
215
+
216
+ ```
217
+ /sdlc retest <build-id> pass # verifies that one defect on that build
218
+ /sdlc retest <build-id> fail # re-opens investigation (attach steps)
219
+ /sdlc accept <build-id> # accept the whole candidate (does NOT merge)
220
+ ```
221
+
222
+ A passed retest verifies one defect on one build; it is **not** overall acceptance,
223
+ and neither acceptance nor a passed retest merges the PR. A new candidate or material
224
+ build/environment change **invalidates** previous acceptance. The equivalent local
225
+ commands share the same state:
226
+
227
+ ```bash
228
+ agentic-sdlc install <run-id> --build <build-id>
229
+ agentic-sdlc feedback <run-id> --build <build-id> --file feedback.yaml
230
+ agentic-sdlc accept <run-id> --build <build-id>
231
+ agentic-sdlc devices --project project.example.yaml
232
+ ```
233
+
234
+ ## 7. Safety, recovery, and idempotency
235
+
236
+ - **One writer per worktree** (a pid-checked lock). A second writer is refused.
237
+ - **No destructive Git.** One feature branch + one PR per task; never force-push,
238
+ never reset/modify the base branch. The repo's real default branch is honored.
239
+ - **Idempotent publication.** PR/issue/comment writes are journaled with stable
240
+ operation keys and hidden markers; an uncertain response is reconciled before any
241
+ retry, so a restart never creates duplicates. Defects reuse a stable fingerprint →
242
+ one canonical issue across revisions.
243
+ - **Resume reconciles reality**, not just the checkpoint: it syncs the actual
244
+ worktree HEAD, and if an interrupted worker left uncommitted changes it preserves
245
+ them and asks for a deliberate recovery decision instead of re-running a coding
246
+ phase over partial edits. It will not overwrite an active manual-testing session.
247
+ - Workers run in their own **process group** with bounded timeouts; cancellation stops
248
+ owned children only. Secrets are redacted from logs; large logs are artifacts
249
+ referenced from state, never inlined.
250
+
251
+ ## 8. What is verified (honestly)
252
+
253
+ - **Fully exercised with fake worker executables + real tooling** (real `git`
254
+ worktrees, real `pytest` execution, in-memory GitHub/device boundaries): the entire
255
+ pipeline and the recovery/idempotency behaviors. Run the suite:
256
+
257
+ ```bash
258
+ pip install -e ".[dev]" && pytest
259
+ ```
260
+
261
+ 29 tests cover the acceptance criteria (happy path, review→repair, product-defect
262
+ classification + fix, invalid-test correction, budget exhaustion, scope violations,
263
+ evidence gates, mobile delivery + acceptance, acceptance invalidation, idempotent
264
+ publication, authorized/deduped comment commands, pause→resume, resume recovery).
265
+
266
+ - **Real CLI adapters** are built against the installed `codex 0.167.x` and
267
+ `claude 2.1.x` flags (`codex exec --json --output-schema -o`; `claude -p
268
+ --output-format json --json-schema --session-id`). A **real subscription-backed
269
+ smoke test is not run automatically** because it spends your usage and needs a
270
+ target repo; enable it deliberately once a target app is connected (Milestone 5).
271
+
272
+ - The `--simulate-device` adapter is **clearly labeled simulated** and never
273
+ represented as a physical phone installation.
274
+
275
+ ## 9. First real integration (what's needed)
276
+
277
+ To connect your real app and phone:
278
+
279
+ 1. Point `repo_path` at the app; set `required_test_commands` to its real checks.
280
+ 2. For mobile: set `is_mobile: true`, the `device:` block (platform, **adb serial**,
281
+ `build_command`, `artifact_glob`, `application_id`, `launch_activity`), and connect
282
+ + authorize the phone (`agentic-sdlc devices` to find the serial).
283
+ 3. For publish: set `mode: publish`, `github.repo`, authorized identities, and copy
284
+ the issue templates into the app repo.
285
+ 4. Run a small, reversible task first.
286
+
287
+ Still needed from you for a live mobile run: the **target repo path/remote**, the
288
+ **phone platform** (Android works locally; iOS needs a Mac worker), and the **device
289
+ serial**.
290
+
291
+ ## 10. Scope
292
+
293
+ In scope: local orchestration, review/test/repair loops, mobile dev build + install +
294
+ manual acceptance, GitHub bug intake. Out of scope (first version): automatic merge,
295
+ production deployment, app-store release, dashboards, RAG/vector DBs, hosted services.
296
+ **You** make the merge decision.
297
+
298
+ ## Project layout
299
+
300
+ ```
301
+ agentic_sdlc/
302
+ schemas/ validated models for every control signal + the RunState
303
+ adapters/ process supervision + real Codex/Claude CLI adapters
304
+ git_ops/ worktree isolation + idempotent GitHub ops
305
+ runner/ test execution + evidence parsing
306
+ rag/ per-role RAG retrieval strategies
307
+ build/ build + device adapters + Android pipeline modules:
308
+ robolectric, compose_testing, architecture_specs,
309
+ adr, emulator_matrix, emulator_snapshots,
310
+ release_manager, sprint_manager, gradle_catalog,
311
+ security_scanner, deploy, coverage, performance
312
+ feedback/ GitHub intake (auth, dedup, /sdlc commands) + acceptance
313
+ workflow/ LangGraph 19-node graph, engine nodes, sandbox, controller
314
+ prompts/ role prompts (developer, reviewer, QA, classifier)
315
+ cli.py the agentic-sdlc command line
316
+ examples/ starter configs, GitHub templates, fake workers
317
+ tests/ 218 tests covering the full pipeline
318
+ Dockerfile containerized distribution
319
+ ```
@@ -0,0 +1,14 @@
1
+ """Agentic SDLC orchestrator.
2
+
3
+ A reusable, local-first controller that coordinates the Codex CLI and the
4
+ Claude Code CLI (through their existing subscription-authenticated runtimes)
5
+ to drive a software change from implementation through independent review,
6
+ regression testing, repair, final verification, mobile build/install, and
7
+ human acceptance on a configured phone.
8
+
9
+ The orchestrator is its own project and Git repository. It never builds itself
10
+ inside a target application's source tree; instead it creates isolated Git
11
+ worktrees per task and operates the target through configuration.
12
+ """
13
+
14
+ __version__ = "0.1.0"