devcouncil 0.1.0 → 0.2.0

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 (190) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +197 -494
  3. package/package.json +9 -2
  4. package/pyproject.toml +62 -27
  5. package/src/devcouncil/__main__.py +4 -4
  6. package/src/devcouncil/app/__init__.py +28 -28
  7. package/src/devcouncil/app/config.py +297 -108
  8. package/src/devcouncil/app/errors.py +23 -23
  9. package/src/devcouncil/app/events.py +44 -44
  10. package/src/devcouncil/app/orchestrator.py +67 -67
  11. package/src/devcouncil/app/project_status.py +29 -0
  12. package/src/devcouncil/app/run_context.py +39 -39
  13. package/src/devcouncil/app/state_machine.py +108 -108
  14. package/src/devcouncil/artifacts/__init__.py +1 -1
  15. package/src/devcouncil/artifacts/coverage.py +96 -96
  16. package/src/devcouncil/artifacts/graph.py +163 -143
  17. package/src/devcouncil/artifacts/migrations.py +20 -20
  18. package/src/devcouncil/artifacts/schemas.py +23 -23
  19. package/src/devcouncil/artifacts/serializer.py +21 -21
  20. package/src/devcouncil/artifacts/validators.py +27 -27
  21. package/src/devcouncil/assets/__init__.py +1 -0
  22. package/src/devcouncil/assets/devcouncil-logo.svg +60 -0
  23. package/src/devcouncil/assets/devcouncil_logo_premium.png +0 -0
  24. package/src/devcouncil/cli/commands/agents.py +292 -0
  25. package/src/devcouncil/cli/commands/artifacts.py +54 -48
  26. package/src/devcouncil/cli/commands/ast.py +22 -0
  27. package/src/devcouncil/cli/commands/baseline.py +35 -32
  28. package/src/devcouncil/cli/commands/check.py +209 -0
  29. package/src/devcouncil/cli/commands/config.py +115 -54
  30. package/src/devcouncil/cli/commands/cost.py +57 -0
  31. package/src/devcouncil/cli/commands/dashboard.py +31 -0
  32. package/src/devcouncil/cli/commands/doctor.py +291 -47
  33. package/src/devcouncil/cli/commands/evidence.py +48 -0
  34. package/src/devcouncil/cli/commands/go.py +656 -0
  35. package/src/devcouncil/cli/commands/handoff.py +69 -0
  36. package/src/devcouncil/cli/commands/hook.py +209 -33
  37. package/src/devcouncil/cli/commands/init.py +204 -57
  38. package/src/devcouncil/cli/commands/integrate.py +1171 -76
  39. package/src/devcouncil/cli/commands/lsp.py +20 -0
  40. package/src/devcouncil/cli/commands/map.py +96 -22
  41. package/src/devcouncil/cli/commands/plan.py +422 -210
  42. package/src/devcouncil/cli/commands/prompt.py +48 -34
  43. package/src/devcouncil/cli/commands/repair.py +89 -69
  44. package/src/devcouncil/cli/commands/report.py +120 -54
  45. package/src/devcouncil/cli/commands/reset_demo_state.py +33 -28
  46. package/src/devcouncil/cli/commands/rollback.py +55 -54
  47. package/src/devcouncil/cli/commands/run.py +285 -220
  48. package/src/devcouncil/cli/commands/runs.py +223 -0
  49. package/src/devcouncil/cli/commands/scaffold.py +32 -0
  50. package/src/devcouncil/cli/commands/semantic.py +47 -0
  51. package/src/devcouncil/cli/commands/setup.py +300 -20
  52. package/src/devcouncil/cli/commands/shell.py +73 -0
  53. package/src/devcouncil/cli/commands/show.py +76 -57
  54. package/src/devcouncil/cli/commands/skills.py +88 -0
  55. package/src/devcouncil/cli/commands/status.py +141 -105
  56. package/src/devcouncil/cli/commands/tasks.py +55 -41
  57. package/src/devcouncil/cli/commands/trace.py +49 -4
  58. package/src/devcouncil/cli/commands/verify.py +293 -128
  59. package/src/devcouncil/cli/commands/version.py +20 -20
  60. package/src/devcouncil/cli/commands/watch.py +574 -0
  61. package/src/devcouncil/cli/commands/watch_fs.py +40 -0
  62. package/src/devcouncil/cli/main.py +92 -25
  63. package/src/devcouncil/council/prompts/arbiter.md +19 -19
  64. package/src/devcouncil/council/prompts/critic_a.md +10 -10
  65. package/src/devcouncil/council/prompts/critic_b.md +10 -10
  66. package/src/devcouncil/council/prompts/implementation_reviewer.md +16 -16
  67. package/src/devcouncil/council/prompts/planner_a.md +16 -16
  68. package/src/devcouncil/council/prompts/planner_b.md +16 -16
  69. package/src/devcouncil/council/prompts/rebuttal.md +10 -10
  70. package/src/devcouncil/council/prompts/spec_writer.md +12 -12
  71. package/src/devcouncil/domain/assumption.py +17 -17
  72. package/src/devcouncil/domain/critique.py +32 -32
  73. package/src/devcouncil/domain/evidence.py +47 -27
  74. package/src/devcouncil/domain/gap.py +52 -26
  75. package/src/devcouncil/domain/requirement.py +22 -22
  76. package/src/devcouncil/domain/task.py +55 -26
  77. package/src/devcouncil/execution/__init__.py +1 -1
  78. package/src/devcouncil/execution/checkpoints.py +246 -0
  79. package/src/devcouncil/execution/context_builder.py +54 -54
  80. package/src/devcouncil/execution/executor.py +15 -15
  81. package/src/devcouncil/execution/fs_watcher.py +180 -0
  82. package/src/devcouncil/execution/handoff.py +102 -0
  83. package/src/devcouncil/execution/hook_policy.py +186 -77
  84. package/src/devcouncil/execution/patch.py +77 -28
  85. package/src/devcouncil/execution/permissions.py +52 -59
  86. package/src/devcouncil/execution/policy_engine.py +343 -0
  87. package/src/devcouncil/execution/prompt_builder.py +650 -38
  88. package/src/devcouncil/execution/shell_session.py +225 -0
  89. package/src/devcouncil/execution/task_runner.py +68 -64
  90. package/src/devcouncil/executors/__init__.py +1 -1
  91. package/src/devcouncil/executors/agent_registry.py +575 -0
  92. package/src/devcouncil/executors/coding_cli.py +736 -0
  93. package/src/devcouncil/executors/mini_swe.py +63 -63
  94. package/src/devcouncil/executors/native/agent.py +186 -85
  95. package/src/devcouncil/executors/openhands.py +56 -56
  96. package/src/devcouncil/gating/__init__.py +1 -1
  97. package/src/devcouncil/gating/checks/clean_git.py +52 -45
  98. package/src/devcouncil/gating/checks/planned_files_check.py +32 -32
  99. package/src/devcouncil/gating/checks/requirement_coverage.py +26 -26
  100. package/src/devcouncil/gating/checks/secret_scan_check.py +53 -34
  101. package/src/devcouncil/gating/policy.py +315 -167
  102. package/src/devcouncil/hardware.py +184 -0
  103. package/src/devcouncil/indexing/__init__.py +1 -1
  104. package/src/devcouncil/indexing/ast_matcher.py +168 -0
  105. package/src/devcouncil/indexing/graph_index.py +48 -48
  106. package/src/devcouncil/indexing/lsp.py +161 -0
  107. package/src/devcouncil/indexing/repo_mapper.py +1455 -204
  108. package/src/devcouncil/indexing/semantic_index.py +205 -0
  109. package/src/devcouncil/integrations/actions.py +146 -0
  110. package/src/devcouncil/integrations/check.py +423 -0
  111. package/src/devcouncil/integrations/github.py +35 -35
  112. package/src/devcouncil/integrations/github_intent.py +142 -0
  113. package/src/devcouncil/integrations/gitnexus.py +62 -27
  114. package/src/devcouncil/integrations/graphify.py +34 -34
  115. package/src/devcouncil/integrations/mcp/server.py +2072 -96
  116. package/src/devcouncil/integrations/opencode_devcouncil_plugin.mjs +24 -0
  117. package/src/devcouncil/integrations/pr_comments.py +62 -0
  118. package/src/devcouncil/live/__init__.py +2 -0
  119. package/src/devcouncil/live/cards.py +349 -0
  120. package/src/devcouncil/live/models.py +63 -0
  121. package/src/devcouncil/live/repair_prompt.py +83 -0
  122. package/src/devcouncil/live/reviewer.py +70 -0
  123. package/src/devcouncil/live/signals.py +135 -0
  124. package/src/devcouncil/live/summary.py +34 -0
  125. package/src/devcouncil/live/tasks.py +18 -0
  126. package/src/devcouncil/live/transcripts.py +141 -0
  127. package/src/devcouncil/llm/__init__.py +1 -1
  128. package/src/devcouncil/llm/cache.py +42 -38
  129. package/src/devcouncil/llm/model_defaults.yaml +44 -0
  130. package/src/devcouncil/llm/provider.py +627 -125
  131. package/src/devcouncil/llm/router.py +303 -118
  132. package/src/devcouncil/optimization/__init__.py +1 -0
  133. package/src/devcouncil/optimization/gepa_agent.py +318 -0
  134. package/src/devcouncil/planning/__init__.py +1 -1
  135. package/src/devcouncil/planning/arbiter_service.py +57 -57
  136. package/src/devcouncil/planning/correction_manifest.py +303 -0
  137. package/src/devcouncil/planning/critique_service.py +71 -66
  138. package/src/devcouncil/planning/plan_service.py +60 -46
  139. package/src/devcouncil/planning/prompt_enhancer_service.py +167 -0
  140. package/src/devcouncil/planning/repair_service.py +39 -39
  141. package/src/devcouncil/planning/spec_service.py +70 -44
  142. package/src/devcouncil/repo/ci_scaffold.py +157 -0
  143. package/src/devcouncil/repo/gitignore.py +123 -0
  144. package/src/devcouncil/repo/sca.py +374 -0
  145. package/src/devcouncil/reporting/github_check.py +32 -32
  146. package/src/devcouncil/reporting/json_report.py +30 -17
  147. package/src/devcouncil/reporting/markdown_report.py +83 -46
  148. package/src/devcouncil/reporting/report_builder.py +14 -14
  149. package/src/devcouncil/skills/__init__.py +19 -0
  150. package/src/devcouncil/skills/library/README.md +46 -0
  151. package/src/devcouncil/skills/library/ai-training.md +50 -0
  152. package/src/devcouncil/skills/library/android.md +50 -0
  153. package/src/devcouncil/skills/library/backend.md +52 -0
  154. package/src/devcouncil/skills/library/core-engineering.md +95 -0
  155. package/src/devcouncil/skills/library/data-engineering.md +47 -0
  156. package/src/devcouncil/skills/library/desktop.md +46 -0
  157. package/src/devcouncil/skills/library/devops.md +48 -0
  158. package/src/devcouncil/skills/library/game-dev.md +46 -0
  159. package/src/devcouncil/skills/library/ios.md +48 -0
  160. package/src/devcouncil/skills/library/mobile-cross-platform.md +46 -0
  161. package/src/devcouncil/skills/library/security.md +48 -0
  162. package/src/devcouncil/skills/library/systems.md +48 -0
  163. package/src/devcouncil/skills/library/web.md +47 -0
  164. package/src/devcouncil/skills/library/windows.md +47 -0
  165. package/src/devcouncil/skills/registry.py +330 -0
  166. package/src/devcouncil/storage/db.py +147 -66
  167. package/src/devcouncil/storage/models.py +204 -83
  168. package/src/devcouncil/storage/native.py +557 -0
  169. package/src/devcouncil/storage/repositories.py +388 -249
  170. package/src/devcouncil/telemetry/cost.py +140 -34
  171. package/src/devcouncil/telemetry/model_pricing.yaml +48 -0
  172. package/src/devcouncil/telemetry/pricing.py +28 -0
  173. package/src/devcouncil/telemetry/traces.py +62 -7
  174. package/src/devcouncil/telemetry/tracker.py +52 -49
  175. package/src/devcouncil/ui/__init__.py +1 -0
  176. package/src/devcouncil/ui/dashboard.py +423 -0
  177. package/src/devcouncil/utils/__init__.py +1 -1
  178. package/src/devcouncil/utils/redaction.py +147 -141
  179. package/src/devcouncil/utils/subprocess_env.py +69 -0
  180. package/src/devcouncil/verification/__init__.py +1 -1
  181. package/src/devcouncil/verification/acceptance_compiler.py +125 -0
  182. package/src/devcouncil/verification/ad_hoc_check.py +129 -0
  183. package/src/devcouncil/verification/diff_coverage.py +353 -0
  184. package/src/devcouncil/verification/implementation_reviewer.py +55 -55
  185. package/src/devcouncil/verification/next_actions.py +189 -0
  186. package/src/devcouncil/verification/sandbox.py +178 -0
  187. package/src/devcouncil/verification/test_resolver.py +91 -0
  188. package/src/devcouncil/verification/verifier.py +1342 -307
  189. package/uv.lock +205 -64
  190. package/src/devcouncil/indexing/symbol_index.py +0 -0
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # DevCouncil: The Gated AI Orchestrator
2
2
 
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/bharathvbcr/DevCouncil/main/src/devcouncil/assets/devcouncil_logo_premium.png" alt="DevCouncil Logo" width="300">
5
+ </p>
6
+
3
7
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
4
8
  [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
5
9
  [![uv](https://img.shields.io/badge/managed%20by-uv-purple.svg)](https://github.com/astral-sh/uv)
@@ -8,25 +12,22 @@
8
12
 
9
13
  DevCouncil is a high-integrity command-line orchestration platform for AI-assisted software development. It turns AI implementation from a black-box generation task into a gated engineering workflow where every change is authorized, verified, and traceable back to a requirement.
10
14
 
11
- DevCouncil is not trying to replace coding agents. It sits beside tools like Codex CLI, Gemini CLI, Claude Code, Cursor, and Aider, then owns the plan, task scope, verification loop, repair prompts, and evidence trail.
12
-
13
- ---
15
+ DevCouncil does not replace coding agents. It sits beside tools like Codex CLI, Gemini CLI, Claude Code, OpenCode, Google Antigravity CLI, Warp/Oz, Cursor, Aider, and bring-your-own prompt-taking CLIs, then owns the plan, task scope, verification loop, repair prompts, and evidence trail.
14
16
 
15
- ## Table Of Contents
17
+ ## Documentation
16
18
 
17
- - [Why DevCouncil Exists](#why-devcouncil-exists)
18
- - [Quickstart](#quickstart)
19
- - [Daily Workflow](#daily-workflow)
20
- - [Coding CLI Integration](#coding-cli-integration)
21
- - [Installation](#installation)
22
- - [CLI Command Reference](#cli-command-reference)
23
- - [Architecture](#architecture)
24
- - [Project Status](#project-status)
25
- - [Security Model](#security-model)
26
- - [Acknowledgements](#acknowledgements)
27
- - [License](#license)
28
-
29
- ---
19
+ - [Quickstart](docs/quickstart.md): shortest install-to-first-task path.
20
+ - [Daily workflow](docs/workflow.md): manual sidecar loop, verification, repair, and rollback.
21
+ - [Coding CLI integration](docs/coding-cli-integration.md): Codex, Gemini, Claude Code, OpenCode, Antigravity, Cursor, Aider, MCP, hooks, and automated executors.
22
+ - [Integration tiers](docs/integration-tiers.md): headless executor vs MCP-only vs sidecar definitions.
23
+ - [CLI command reference](docs/cli-reference.md): available `dev` commands.
24
+ - [Architecture](docs/architecture.md): components, artifact graph, state machine, and gated execution.
25
+ - [Executor adapters](docs/executor-adapters.md): manual, coding CLI, native-preview, Mini-SWE, and OpenHands execution paths.
26
+ - [Live review](docs/live-review.md): `dev watch` session review, cards, signals, and blocking behavior.
27
+ - [Model routing](docs/model-routing.md): provider selection, role models, OpenRouter, Vertex AI, Doubleword, and Ollama (local) setup.
28
+ - [Security model](docs/security.md): redaction, permissions, allowlists, and local state.
29
+ - [Project status](docs/project-status.md): current maturity by subsystem.
30
+ - [Roadmap](docs/roadmap.md): planned work.
30
31
 
31
32
  ## Why DevCouncil Exists
32
33
 
@@ -41,33 +42,11 @@ Standard AI coding agents are good at producing the happy path, but they often f
41
42
 
42
43
  It creates a persistent **Requirement -> Task -> Diff -> Evidence** graph, blocks completion when evidence is missing, detects unauthorized changes, and produces a final report that can be reviewed like an engineering artifact.
43
44
 
44
- ---
45
-
46
45
  ## Quickstart
47
46
 
48
47
  Run DevCouncil commands in a normal terminal from the root of the repository you want DevCouncil to manage. Do not run these commands inside a coding CLI chat.
49
48
 
50
- **Where to run what:**
51
-
52
- - Terminal at repo root: `dev setup`, `dev plan`, `dev run`, `dev prompt`, `dev verify`.
53
- - Coding CLI chat: paste only the generated output from `dev prompt TASK-ID`.
54
- - Different repo path: use `dev setup --project-root path/to/project`.
55
-
56
- If you are developing DevCouncil itself, install dependencies from this checkout:
57
-
58
- ```bash
59
- uv sync
60
- uv run dev setup
61
- ```
62
-
63
- For normal use from a local checkout, install DevCouncil as a `uv` tool:
64
-
65
- ```bash
66
- uv tool install --force .
67
- devcouncil --help
68
- ```
69
-
70
- If `uv` is missing, install it first:
49
+ Install `uv` first if it is missing:
71
50
 
72
51
  ```powershell
73
52
  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
@@ -79,18 +58,19 @@ On macOS or Linux:
79
58
  curl -LsSf https://astral.sh/uv/install.sh | sh
80
59
  ```
81
60
 
82
- After installing DevCouncil globally, initialize it in a target repository:
61
+ Install DevCouncil from npm:
83
62
 
84
63
  ```bash
85
- cd path/to/your/project
86
- dev setup
64
+ npm install -g devcouncil
65
+ devcouncil --help
66
+ dev --help
87
67
  ```
88
68
 
89
- `dev setup` creates `.devcouncil/` if needed, runs the environment doctor, and prints the next commands for planning, prompting, and verification.
90
-
91
- Start the first gated workflow:
69
+ Start the first gated workflow from your target repository:
92
70
 
93
71
  ```bash
72
+ cd path/to/your/project
73
+ dev setup
94
74
  dev plan "Describe the implementation goal"
95
75
  dev tasks
96
76
  dev run TASK-001 --executor manual
@@ -98,541 +78,264 @@ dev prompt TASK-001
98
78
  dev verify TASK-001
99
79
  ```
100
80
 
101
- Paste only the output from `dev prompt TASK-001` into Codex, Gemini, Claude Code, Cursor, Aider, or another coding tool. Keep `dev setup`, `dev plan`, `dev run`, and `dev verify` in the terminal at the repository root.
102
-
103
- For the shortest install-to-first-task guide, see [docs/quickstart.md](docs/quickstart.md).
81
+ On a fresh interactive setup, DevCouncil can configure supported coding CLI integrations immediately; pass `--skip-integrations` if you want to defer that step.
104
82
 
105
- ---
106
-
107
- ## Daily Workflow
83
+ ### Run locally on macOS (Apple Silicon + Ollama)
108
84
 
109
- DevCouncil's recommended default is **Manual Sidecar Mode**:
110
-
111
- 1. DevCouncil plans the work and creates a task graph.
112
- 2. You ask DevCouncil for one constrained task prompt.
113
- 3. You paste that prompt into your coding CLI or agent.
114
- 4. The agent edits the repository.
115
- 5. DevCouncil verifies the resulting diff against task constraints.
116
- 6. If verification fails, DevCouncil creates a focused repair loop.
117
-
118
- ### 1. Create The Implementation Plan
85
+ DevCouncil runs fully offline against [Ollama](https://ollama.com) — no API key, no per-token cost. It is Apple-Silicon-aware: `dev setup --provider ollama` sizes the default local model to your Mac's unified memory, and `dev doctor` reports the chip/RAM, pings the Ollama server, and flags a too-small context window.
119
86
 
120
87
  ```bash
121
- dev plan "Add password reset with expiring single-use tokens"
88
+ brew install ollama && ollama serve
89
+ ollama pull qwen2.5-coder:32b # use the size `dev doctor` recommends for your RAM
90
+ export OLLAMA_NUM_CTX=16384 # large planning prompts need a raised context window
91
+ dev setup --provider ollama # auto-selects the model for your RAM
122
92
  ```
123
93
 
124
- DevCouncil maps the repository, drafts requirements, runs planner and critic roles, and stores an approved task graph locally.
125
-
126
- Inspect the plan:
94
+ See [Model routing macOS / Apple Silicon](docs/model-routing.md) for the RAM-to-model table.
127
95
 
128
- ```bash
129
- dev status
130
- dev tasks
131
- dev show TASK-001
132
- ```
96
+ Paste only the output from `dev prompt TASK-001` into Codex, Gemini, Claude Code, OpenCode, Antigravity, Warp, Cursor, Aider, or another coding tool. Keep `dev setup`, `dev plan`, `dev run`, and `dev verify` in the terminal at the repository root.
133
97
 
134
- ### 2. Start One Task
98
+ For an automated end-to-end run with a supported coding CLI installed:
135
99
 
136
100
  ```bash
137
- dev run TASK-001 --executor manual
101
+ dev e2e "Describe the implementation goal" --executor codex
102
+ dev e2e "Describe the implementation goal" --executor antigravity
103
+ dev e2e "Describe the implementation goal" --executor warp
104
+ dev go "Describe the implementation goal" --executor codex
138
105
  ```
139
106
 
140
- This creates a checkpoint and marks the task as running. DevCouncil expects the next repository diff to match this task's allowed files, acceptance criteria, and verification commands.
107
+ `dev e2e` is the explicit one-command integration target for coding agents. It initializes local DevCouncil state if needed, plans the goal, runs each approved task through the selected executor, verifies the resulting diff, and prints the final report. If `--executor` is omitted, DevCouncil uses `execution.default_executor` from `.devcouncil/config.yaml`. `dev go` is kept as a shorter alias for the same flow.
141
108
 
142
- ### 3. Generate The Coding Prompt
109
+ For machine-readable agent handoff, write the final report to a stable file:
143
110
 
144
111
  ```bash
145
- dev prompt TASK-001
112
+ dev e2e "Describe the implementation goal" --executor codex --agent
113
+ dev e2e "Describe the implementation goal" --executor codex --json --report-file .devcouncil/reports/latest.json
146
114
  ```
147
115
 
148
- Paste the full output into your coding CLI. The generated prompt includes the task objective, allowed files, constraints, acceptance criteria, and evidence requirements.
116
+ `--agent` enables JSON output and writes `.devcouncil/reports/latest.json`. Fresh projects default to manual sidecar mode, so pass an automated executor or set `execution.default_executor` before using `dev e2e` without `--executor`.
149
117
 
150
- ### 4. Verify The Result
118
+ See the full [quickstart](docs/quickstart.md) for installation variants, API-key setup, and first-run guidance.
151
119
 
152
- After the coding CLI modifies the repository:
120
+ OpenCode and Google Antigravity CLI are built-in executors and MCP integrations:
153
121
 
154
122
  ```bash
155
- dev verify TASK-001
123
+ dev integrate opencode --apply
124
+ dev run TASK-001 --executor opencode
125
+ dev agents run TASK-001 --agent opencode --profile default
126
+ dev integrate antigravity --apply
127
+ dev run TASK-001 --executor antigravity
128
+ dev agents run TASK-001 --agent agy --profile default
156
129
  ```
157
130
 
158
- Verification records evidence and marks the task as either `verified` or `blocked`.
159
-
160
- Inspect the result:
131
+ Register any other local CLI that accepts prompts. `dev agents` is the first-class agent hub; `dev integrate cli-agent` remains available for older scripts:
161
132
 
162
133
  ```bash
163
- dev status
164
- dev report
165
- dev report --json
134
+ dev agents add myagent --command myagent --arg run --input-mode prompt-file --prompt-arg=--prompt-file --supports-mcp
135
+ dev agents
136
+ dev agents doctor
137
+ dev agents run TASK-001 --agent myagent --profile default
166
138
  ```
167
139
 
168
- ### 5. Repair Gaps
169
-
170
- If verification blocks the task, convert the gaps into focused repair work:
140
+ GEPA prompt-profile optimization is available for the agent hub:
171
141
 
172
142
  ```bash
173
- dev repair
174
- dev tasks
175
- dev prompt REPAIR-001
143
+ dev agents optimize --agent codex --profile yolo --evals .devcouncil/evals/agent-profile.jsonl --dry-run
144
+ dev agents optimize --agent codex --profile yolo --evals .devcouncil/evals/agent-profile.jsonl --apply
176
145
  ```
177
146
 
178
- Paste the repair prompt into the same coding CLI, then verify again:
147
+ ## Feature Set
179
148
 
180
- ```bash
181
- dev verify REPAIR-001
182
- dev verify TASK-001
183
- ```
149
+ DevCouncil is an application layer around coding agents. It does not just emit prompts; it owns the workflow state, validates task scope, records evidence, and produces release-style reports.
184
150
 
185
- ### 6. Continue Task By Task
151
+ ### Workflow Features
186
152
 
187
- ```bash
188
- dev tasks
189
- dev show TASK-002
190
- dev run TASK-002 --executor manual
191
- dev prompt TASK-002
192
- dev verify TASK-002
193
- dev report
194
- ```
153
+ - **Repository onboarding:** `dev setup` initializes `.devcouncil/`, generates the repo map + `AGENTS.md`/`CLAUDE.md` guides, scaffolds applicable engineering skills, runs environment checks, offers integration setup, and prints the next useful commands. Use `--skip-map` / `--skip-skills` to opt out, or `--scaffold-ci` to also write a starter GitHub Actions workflow.
154
+ - **Repository mapping:** `dev map` writes `.devcouncil/repo_map.json`, identifies important files and subsystems, filters generated/temp files, and keeps managed `AGENTS.md` / `CLAUDE.md` workspace guides synchronized. Subsystems, entry points, neighbors, and important surfaces are now inferred generically for **any** repository — grouped from the directory tree and ranked by an import-graph in-degree — so the map (and the structural context it feeds into prompts) is meaningful outside DevCouncil's own tree, not just within it. The map records the git HEAD and tracked-file fingerprint it was built from; when prompts reuse a map that has fallen behind the current code, they flag it as stale (run `dev map` to refresh) rather than silently feeding wrong structure. The map is also generated automatically on first init.
155
+ - **Engineering skills:** `dev skills` lists the bundled skills and shows which apply to the repository; `dev skills scaffold` writes them into `.claude/skills/<name>/SKILL.md`. A merged always-on `core-engineering` skill (think-before-coding, simplicity, surgical changes, goal-driven execution, evidence-grounded communication) plus domain skills (Android, iOS, Windows, web, AI training) that brief the agent on current SDKs, deprecations, and tooling before coding. Applicable skills are also embedded into `dev prompt` output.
156
+ - **CI scaffolding:** `dev scaffold-ci` writes a starter `.github/workflows/devcouncil.yml` derived from the configured test/lint/typecheck commands, filtered to the detected language stack; it never overwrites existing CI unless `--force`.
157
+ - **Planning council:** `dev plan` turns a goal into requirements, acceptance criteria, assumptions, critique findings, and executable tasks.
158
+ - **Task graph:** `dev tasks` and `dev show TASK-001` expose requirement links, acceptance-criterion links, planned files, expected tests, allowed commands, forbidden changes, dependencies, and status. Tasks can declare `depends_on`; the plan gate rejects unknown dependencies and cycles, and `dev go`/`dev e2e` run tasks in topological order and skip a task whose prerequisites didn't complete (rather than letting it fail spuriously and burn its repair budget).
159
+ - **Scoped task prompts:** `dev prompt TASK-001` creates a constrained implementation prompt for sidecar agents, including file scope, verification expectations, and forbidden changes. The prompt now embeds the current (secret-redacted) contents of each planned file with a top-level symbol outline, structural orientation (from the code-review graph when available, otherwise the generated `repo_map.json`), and a **dependents (blast-radius) list** — the files that import each file being changed, from the map's precomputed reverse-import index — so the agent edits in place and keeps call sites working instead of starting blind. A central prompt budget keeps the core (goal/scope/instructions) always present and fits the optional context sections in priority order (file contents > structural > dependents > skills), dropping the lowest-priority ones with an explicit marker rather than overflowing silently.
160
+ - **Execution:** `dev run TASK-001` supports manual sidecar mode, built-in coding CLI executors, external executors, and registered custom CLI agents.
161
+ - **One-command flow:** `dev e2e "goal"` and `dev go "goal"` can initialize state, plan, run approved tasks, verify the diff, and generate a report. With an automated executor the run is now a **closed loop**: a task that fails verification is re-driven through a bounded self-repair loop (a correction manifest is written and the executor re-run) until it verifies or the `execution.max_repair_attempts` budget is spent, with no-progress detection that stops early when the same blocking gaps reappear.
162
+ - **Verification:** `dev verify TASK-001` captures the diff, runs expected evidence commands, checks planned-file compliance, detects orphan changes, flags unplanned dependency edits, scans for secrets, and links evidence to acceptance criteria. An **empty diff can no longer pass** a task that declares files to create or modify (work that committed earlier is still recognized via the task checkpoint), and the result reports the rigor it ran at (`verification_mode` compiled vs coarse, `diff_empty`, `coverage_measured`/`coverage_skipped_reason`) plus a distinct `advisory_actions` list so an agent never mistakes "passed" for "proven." `dev verify` exits non-zero when a task is blocked so shell-driven agents can gate on `$?`.
163
+ - **Repair:** `dev repair` converts blocking gaps into focused follow-up work instead of leaving failures as vague test output.
164
+ - **Rollback:** `dev rollback TASK-001` uses task checkpoints to revert scoped work when a task needs to be backed out.
165
+ - **Reporting:** `dev report` emits a requirements coverage table, evidence summary, blocking gaps, and live-review blockers; JSON and PR-comment paths are available for automation.
195
166
 
196
- Recommended working rules:
167
+ ### App Surfaces
197
168
 
198
- - Run DevCouncil and the coding CLI from the same repository root.
199
- - Give the coding CLI one DevCouncil task prompt at a time.
200
- - Do not ask the coding CLI to broaden scope beyond the generated prompt.
201
- - Run `dev verify TASK-ID` before committing agent-generated changes.
202
- - Use `dev repair` for follow-up fixes instead of free-form retry prompts.
203
- - Use `dev rollback TASK-ID` if a task needs to be reverted from its checkpoint.
204
- - Treat `.devcouncil/` as local project state and the audit trail for the gated run.
169
+ - **CLI:** `dev` and `devcouncil` expose the same Typer command surface for local terminal workflows.
170
+ - **Agent hub:** `dev agents` lists built-in and custom agents, `dev agents add` registers prompt-taking CLIs, `dev agents doctor` checks wiring, `dev agents run` executes a task through a named agent/profile, and `dev agents optimize` uses GEPA to tune profile preambles from offline eval examples.
171
+ - **Integration hub:** `dev integrate all --apply` configures supported coding CLI and MCP integrations; targeted setup exists for Codex, Gemini, Claude Code, OpenCode, Antigravity, Cursor, Warp/Oz, hooks, and custom CLI agents. `dev integrate check` now reports each client's **enforcement posture** — `pre-action` (a native hook blocks unauthorized writes before they happen) vs `verify-only` (forbidden changes are caught only after the fact by verification) — so the containment guarantee isn't overstated for clients without a pre-action gate.
172
+ - **MCP server:** `dev mcp-server` exposes DevCouncil context and workflow tools over stdio for MCP-capable clients. `devcouncil_verify_task` now runs DevCouncil's strong compiled per-criterion checks when a provider key is configured (falling back to a clearly-labeled `coarse` mode otherwise), refuses to pass on an empty diff, and returns `verification_mode`, `diff_empty`, `coverage_measured`/`coverage_skipped_reason`, and an `advisory_actions` array alongside the blocking `next_actions`. Cheap, re-verify-free read tools — `devcouncil_get_gaps` and `devcouncil_get_next_actions` — let a reconnecting agent resume outstanding work from persisted gaps (which now carry `file`/`line`/`suggested_command`/`acceptance_criterion_id`). Task leases expire on a config-driven TTL so a crashed agent's task frees itself, with `devcouncil_renew_lease` and `devcouncil_list_leases` for long runs and fleet supervision; a partial-unique DB index enforces a single active lease per task, so concurrent checkouts can't both win the writer slot. A pure-MCP agent can now make the change itself through lease-gated write tools — `devcouncil_write_file` and `devcouncil_apply_patch` — which policy-check every target path *before* it lands (out-of-scope, protected, or escaping paths are rejected; a patch with any out-of-scope target is rejected whole, never partially applied), write atomically, and record a `FileChangeEvent` for provenance. The corpus is also browsable as MCP **resources** (`devcouncil://report`, `devcouncil://tasks`, `devcouncil://gaps`, `devcouncil://cards`, `devcouncil://task/{id}`) so a host can read project state without a tool call. `devcouncil_get_task_provenance` then exposes that audit trail — gated file changes, verification runs, diff-coverage evidence, and the latest correction manifest — so what happened on disk is inspectable. The diff↔coverage proof is now also retained across graph reloads (it was previously dropped), so reports and `dev status` reflect whether the changed lines were actually exercised.
173
+ - **Live review:** `dev watch` tracks review cards, signals, blocking feedback, and repair guidance while a session is active.
174
+ - **Trace viewer:** `dev trace tail --follow` streams local DevCouncil trace events for execution, verification, and agent handoff.
175
+ - **Dashboard:** `dev dashboard --open` serves a local status dashboard and opens it in the default browser for project state and live workflow visibility.
176
+ - **Agent-consumable CLI:** machine output for shell-driven agents — `dev prompt --json` (`{ok, task_id, prompt}`), `dev handoff --json` (`{ok, manifest_path, run_id, next_command}` to chain `dev run`), `dev verify` exits non-zero when blocked, and `dev status`/`dev report` accept `--fail-on-blocking` to exit non-zero on outstanding blocking gaps so a loop can gate on `$?`.
177
+ - **Config editor:** `dev config` and `dev config models` inspect/update provider, model, executor, and command configuration.
178
+ - **Artifact tools:** `dev artifacts validate` checks stored graph integrity.
179
+ - **Code intelligence:** `dev lsp inspect` checks optional language-server readiness, and `dev ast match` searches code structurally.
180
+ - **Doctor:** `dev doctor` validates local dependencies, commands, and environment prerequisites before a workflow fails deeper in execution.
205
181
 
206
- ---
182
+ ### Agent And Executor Support
207
183
 
208
- ## Coding CLI Integration
184
+ DevCouncil works with human-in-the-loop sidecar sessions and automated prompt handoff:
209
185
 
210
- DevCouncil works with any tool that can accept a prompt and edit files in the same repository.
186
+ - **Manual sidecar:** paste `dev prompt TASK-001` into any agent, then run `dev verify TASK-001`.
187
+ - **Built-in coding CLI adapters:** `codex`, `gemini`, `claude`, `opencode`, `antigravity`, `warp`, `cursor`, `aider`, and aliases such as `codex-cli`, `gemini-cli`, `claude-code`, `opencode-cli`, `antigravity-cli`, `agy`, `agy-cli`, `warp-cli`, `oz`, `cursor-agent`, and `cursor-cli`.
188
+ - **Custom CLI agents:** register any prompt-taking command with stdin, argument, or prompt-file handoff.
189
+ - **Execution profiles:** custom agents can use profiles such as `default`, `yolo`, and `prod` to adjust prompt constraints while DevCouncil still verifies the final diff.
190
+ - **External automated adapters:** `mini`, `openhands`, `native-preview`, and `native` are available when the corresponding local executor is configured.
191
+ - **Hook-aware clients:** `dev integrate hooks --apply` installs write/shell hooks for Codex, Gemini, Claude, Cursor, and OpenCode so DevCouncil policy can block unauthorized actions before verification. The post-task hook can run deterministic verification of the active task and record gaps (enable `execution.verify_on_post_task`; off by default to keep hooks fast). File-write policy uses one shared path normalizer across the hook and task-policy paths that resolves every target and **denies anything outside the project root** (so the path that's checked is the path that's enforced), and the pre-tool-use hook is fail-closed: an unparseable or error payload is surfaced (and blocked under `--strict`/`DEVCOUNCIL_HOOK_STRICT`) rather than silently allowed.
211
192
 
212
- ### Compatibility Matrix
193
+ ### Gates And Evidence
213
194
 
214
- | Tool | Manual sidecar prompts | Headless prompt handoff | DevCouncil MCP tools | Write-blocking hooks |
215
- | :--- | :---: | :---: | :---: | :---: |
216
- | **Codex CLI** | Supported | Supported via `codex exec` | Supported via `codex mcp` | Use DevCouncil verification gates |
217
- | **Gemini CLI** | Supported | Supported via `gemini -p` or stdin | Supported via `gemini mcp` | Use DevCouncil verification gates |
218
- | **Claude Code** | Supported | Tool-dependent | Manual MCP config only | Starter `dev hook` commands |
219
- | **Cursor** | Supported | Tool-dependent | Manual MCP config only | Use DevCouncil verification gates |
220
- | **Aider** | Supported | Prompt/stdin friendly | Not a primary path | Use DevCouncil verification gates |
195
+ DevCouncil blocks completion on concrete gaps rather than model confidence:
221
196
 
222
- ### Fast Integration Setup
197
+ - **Plan approval gates:** requirements must have acceptance criteria, acceptance criteria need verification methods, tasks must map to known requirements and acceptance criteria, high-impact assumptions must be resolved, and high/critical critique findings must be closed.
198
+ - **Task readiness gates:** the working tree must be clean for the task, planned files must be declared, and each task needs allowed commands plus expected verification evidence.
199
+ - **Diff gates:** verification detects files changed outside the planned task scope, dependency-file edits made without authorization, deleted/added files, and untracked file diffs.
200
+ - **Evidence gates:** passing evidence commands are linked back to acceptance criteria; missing passing evidence becomes a blocking gap.
201
+ - **Security gates:** secret scanning runs over captured diffs, and command output is redacted before it is written to logs.
202
+ - **Live-review gates:** unresolved critical review cards can block task verification and appear in reports.
223
203
 
224
- Preview coding CLI integrations:
204
+ ### Providers, Models, And Cost Tracking
225
205
 
226
- ```bash
227
- dev setup --integrate
228
- ```
206
+ - **Providers:** OpenRouter, Vertex AI, Doubleword, and Ollama (local, no key) are supported through local configuration and secrets.
207
+ - **Role models:** planner, critic, arbiter, reviewer, and repair roles can share one model or use per-role overrides.
208
+ - **Structured repair:** model routing includes JSON repair paths for structured planning and review outputs.
209
+ - **Model defaults:** packaged YAML defaults ship with the tool so installed CLI environments do not depend on source-tree-only files.
210
+ - **Telemetry:** local trace and cost data feed `dev status`, reports, and dashboard surfaces.
229
211
 
230
- Apply supported MCP integrations for installed clients:
212
+ ### Reports And Automation Outputs
231
213
 
232
- ```bash
233
- dev setup --integrate --apply
234
- ```
214
+ - **Markdown reports:** include verdict, coverage summary, requirement/task mapping, blocking gaps, and live-review status.
215
+ - **JSON reports:** `--json` and `--report-file` support machine-readable handoff to other automation.
216
+ - **Agent preset:** `--agent` writes `.devcouncil/reports/latest.json` for stable downstream consumption.
217
+ - **PR comments:** `dev report --github-pr-comment` and `dev report --gitlab-pr-comment` can publish verification summaries to pull/merge requests.
218
+ - **GitHub checks:** preview GitHub report/check surfaces are available for repository automation.
235
219
 
236
- Configure every coding CLI with first-party setup support:
220
+ ### Local State And Files
237
221
 
238
- ```bash
239
- dev integrate all --apply
240
- ```
222
+ DevCouncil stores local workflow state in the target repository:
241
223
 
242
- Preview exact setup commands without changing client config:
224
+ - `.devcouncil/config.yaml`: provider, executor, command, integration, and workflow settings.
225
+ - `.devcouncil/secrets.env`: local provider secrets such as API keys or Vertex AI project/location values. Git-ignored; copy `.devcouncil/secrets.env.example` and fill in real values. Environment variables take precedence over this file.
226
+ - `.devcouncil/repo_map.json`: generated repository map and subsystem navigation index.
227
+ - `.devcouncil/state.sqlite`: SQLite state for requirements, assumptions, tasks, evidence, gaps, critique findings, and project phase history.
228
+ - `.devcouncil/checkpoints/`: task snapshots used by verification and rollback.
229
+ - `.devcouncil/logs/`: redacted stdout/stderr from verification commands.
230
+ - `.devcouncil/runs/<run-id>/agent-run.json`: prompt, executor, profile, exit status, and run metadata for automated agent executions.
231
+ - `.devcouncil/reports/latest.json`: optional machine-readable report generated by `dev e2e --agent`.
232
+ - `.devcouncil/integrations/` and `.agents/`: generated integration files such as Warp/Oz MCP JSON and Antigravity MCP config.
243
233
 
244
- ```bash
245
- dev integrate all
246
- ```
234
+ ### Maturity
247
235
 
248
- Verify that DevCouncil is ready to expose MCP tools:
236
+ The stable daily workflow is planning, manual sidecar execution, verification, repair, rollback, and reporting. Coding CLI executors, MCP, live review, dashboard, PR comments, LSP/AST tools, and GitHub check surfaces are preview features. Native autonomous execution is experimental and still requires DevCouncil verification before work is considered complete.
249
237
 
250
- ```bash
251
- dev integrate check
252
- ```
253
-
254
- Set up one first-party integration at a time:
255
-
256
- ```bash
257
- dev integrate codex --apply
258
- dev integrate gemini --apply
259
- ```
260
-
261
- If a configured MCP client launches tools from a different directory, point it at the target repository:
262
-
263
- ```bash
264
- dev integrate all --apply --project-root path/to/project
265
- ```
266
-
267
- ### Codex CLI
268
-
269
- Manual sidecar flow:
270
-
271
- ```bash
272
- cd path/to/project
273
- dev run TASK-001 --executor manual
274
- dev prompt TASK-001
275
- ```
276
-
277
- Paste the generated prompt into Codex CLI. After Codex finishes:
278
-
279
- ```bash
280
- dev verify TASK-001
281
- ```
282
-
283
- Headless handoff:
284
-
285
- ```bash
286
- dev prompt TASK-001 | codex exec -
287
- dev verify TASK-001
288
- ```
289
-
290
- MCP setup:
291
-
292
- ```bash
293
- dev integrate codex --apply
294
- ```
295
-
296
- If Codex launches MCP servers outside the target repository root, set `DEVCOUNCIL_PROJECT_ROOT` to the repository path in the MCP server environment.
238
+ ## Core Flow
297
239
 
298
- ### Gemini CLI
299
-
300
- Manual sidecar flow:
301
-
302
- ```bash
303
- cd path/to/project
304
- dev run TASK-001 --executor manual
305
- dev prompt TASK-001
306
- ```
307
-
308
- Paste the prompt into Gemini CLI, then verify:
309
-
310
- ```bash
311
- dev verify TASK-001
312
- ```
313
-
314
- Headless handoff:
315
-
316
- ```bash
317
- dev prompt TASK-001 | gemini
318
- dev verify TASK-001
319
- ```
320
-
321
- Or:
322
-
323
- ```bash
324
- gemini -p "$(dev prompt TASK-001)"
325
- ```
326
-
327
- MCP setup:
328
-
329
- ```bash
330
- dev integrate gemini --apply
331
- ```
332
-
333
- If Gemini launches MCP servers outside the target repository root, configure the server with `DEVCOUNCIL_PROJECT_ROOT` pointing at the repository that contains `.devcouncil/`.
334
-
335
- ### Claude Code
336
-
337
- Start Claude Code in the same repository, then paste the generated task prompt:
338
-
339
- ```bash
340
- cd path/to/project
341
- dev run TASK-001 --executor manual
342
- dev prompt TASK-001
343
- ```
344
-
345
- After Claude Code finishes:
346
-
347
- ```bash
348
- dev verify TASK-001
349
- ```
350
-
351
- DevCouncil also includes an experimental hook command group:
352
-
353
- ```bash
354
- dev hook --help
355
- ```
356
-
357
- The intended hook integration is to call `dev hook pre-tool-use` before file-writing tools and block unauthorized writes with a non-zero exit. Treat this as experimental until your local Claude Code hook JSON shape matches what `dev hook pre-tool-use` expects.
358
-
359
- ### Cursor
360
-
361
- Use DevCouncil as the planning and verification shell around Cursor:
362
-
363
- ```bash
364
- dev run TASK-001 --executor manual
365
- dev prompt TASK-001
366
- ```
367
-
368
- Paste the prompt into Cursor Chat or Agent mode and instruct Cursor to stay within the prompt's allowed files. When Cursor finishes:
369
-
370
- ```bash
371
- dev verify TASK-001
372
- ```
373
-
374
- If Cursor changes files outside the task scope, DevCouncil verification should flag the unauthorized diff.
375
-
376
- DevCouncil does not currently ship a dedicated `dev integrate cursor` command. Use manual sidecar prompts, or configure Cursor's MCP client manually against `devcouncil mcp-server` with `DEVCOUNCIL_PROJECT_ROOT` set to the target repository.
377
-
378
- ### Aider
379
-
380
- Start Aider in the target repository:
381
-
382
- ```bash
383
- cd path/to/project
384
- aider
385
- ```
386
-
387
- Paste the output from:
388
-
389
- ```bash
390
- dev prompt TASK-001
391
- ```
392
-
393
- After Aider commits or leaves a working-tree diff:
394
-
395
- ```bash
396
- dev verify TASK-001
397
- ```
398
-
399
- If you want DevCouncil to inspect the live working tree before committing, verify before creating the final commit.
400
-
401
- ### Automated Executors
402
-
403
- Manual sidecar mode is the recommended default because it works with any coding CLI and keeps the human in control of the agent session.
404
-
405
- DevCouncil also has experimental executor adapters:
406
-
407
- ```bash
408
- dev run TASK-001 --executor mini
409
- dev run TASK-001 --executor openhands
410
- dev run TASK-001 --executor native
411
- ```
412
-
413
- Use these only when the target executor is installed and configured locally. Automated executor mode lets DevCouncil launch the implementation loop itself, capture the post-run diff, and verify the task automatically.
414
-
415
- The live executor adapter values are `manual`, `mini`, `openhands`, and `native`.
416
-
417
- ---
240
+ DevCouncil's recommended default is **Manual Sidecar Mode**:
418
241
 
419
- ## Installation
242
+ 1. DevCouncil plans the work and creates a task graph.
243
+ 2. You ask DevCouncil for one constrained task prompt.
244
+ 3. You paste that prompt into your coding CLI or agent.
245
+ 4. The agent edits the repository.
246
+ 5. DevCouncil verifies the resulting diff against task constraints.
247
+ 6. If verification fails, DevCouncil creates a focused repair loop.
420
248
 
421
- ### npm Wrapper
249
+ The detailed task-by-task workflow lives in [docs/workflow.md](docs/workflow.md).
422
250
 
423
- The npm wrapper is included for local testing and future registry publishing. Until the package is published to npm, install the wrapper from this checkout:
251
+ ## How The Repo Runs
424
252
 
425
- ```bash
426
- npm install -g .
427
- devcouncil --help
428
- dev --help
429
- ```
253
+ ```mermaid
254
+ flowchart TD
255
+ user["User runs dev/devcouncil"] --> cli["Typer CLI\nsrc/devcouncil/cli/main.py"]
256
+ cli --> config["Config + secrets\n.devcouncil/config.yaml\n.devcouncil/secrets.env"]
257
+ cli --> map["Repo map\nsrc/devcouncil/indexing/repo_mapper.py"]
258
+ cli --> planning["Planning commands\ndev plan / dev prompt / dev tasks"]
430
259
 
431
- The npm wrapper delegates to the Python DevCouncil CLI through `uv`, so `uv` must be installed.
260
+ config --> providers["Model providers\nOpenRouter, Vertex AI, Doubleword, or Ollama"]
261
+ providers --> router["ModelRouter\nrole models, cache, telemetry, structured JSON repair"]
262
+ router --> planning
432
263
 
433
- Check for `uv`:
264
+ planning --> storage["SQLite + repositories\nrequirements, tasks, gaps, evidence, state"]
265
+ storage --> artifactGraph["Artifact graph\nRequirement -> Task -> Diff -> Evidence"]
266
+ artifactGraph --> gates["Gate policy\nplanned files, commands, secret checks"]
434
267
 
435
- ```bash
436
- uv --version
437
- ```
268
+ gates --> manual["Manual sidecar\ndev prompt + user agent edits"]
269
+ gates --> coding["Coding CLI executor\nCodex, Gemini, Claude, OpenCode, Antigravity, Warp, custom CLIs"]
270
+ gates --> native["Native preview executor\nLLM router + TaskRunner"]
271
+ gates --> external["Mini-SWE / OpenHands adapters"]
438
272
 
439
- Install `uv` on Windows:
273
+ coding --> runlog["Run artifacts\nprompt file, redacted logs, manifest, trace events"]
274
+ native --> runlog
275
+ external --> runlog
276
+ manual --> diff["Repository diff"]
277
+ runlog --> diff
440
278
 
441
- ```powershell
442
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
443
- ```
279
+ diff --> verify["Verifier\ndev verify / automatic post-run verification"]
280
+ verify --> evidence["Evidence + gaps"]
281
+ evidence --> storage
282
+ evidence --> repair["Repair loop\ndev repair / dev watch repair"]
283
+ evidence --> report["Reports\ndev report, JSON, GitHub/GitLab comments"]
444
284
 
445
- Install `uv` on macOS or Linux:
285
+ cli --> mcp["MCP server\ndev mcp-server"]
286
+ mcp --> storage
287
+ mcp --> artifactGraph
288
+ mcp --> repair
446
289
 
447
- ```bash
448
- curl -LsSf https://astral.sh/uv/install.sh | sh
290
+ cli --> live["Live review\ndev watch"]
291
+ live --> cards["Cards + signals\nblocking review feedback"]
292
+ cards --> report
449
293
  ```
450
294
 
451
- After publishing the package to npm, users can install the registry package:
452
-
453
- ```bash
454
- npm install -g devcouncil
455
- devcouncil --help
456
- ```
295
+ ## Install From Source
457
296
 
458
- For maintainers publishing the npm wrapper:
297
+ For local development inside this checkout:
459
298
 
460
299
  ```bash
461
- npm login
462
- npm run pack:check
463
- npm publish
300
+ uv sync
301
+ uv run dev --help
464
302
  ```
465
303
 
466
- ### uv Global Install
467
-
468
- From this repository:
304
+ For a global install from this repository:
469
305
 
470
306
  ```bash
471
307
  uv tool install --force .
472
- ```
473
-
474
- DevCouncil installs two command aliases:
475
-
476
- ```bash
477
308
  dev --help
478
309
  devcouncil --help
479
310
  ```
480
311
 
481
- Use `devcouncil` when another tool already owns the `dev` command.
482
-
483
- ### Source Development
484
-
485
- ```bash
486
- git clone https://github.com/bharathvbcr/DevCouncil.git
487
- cd DevCouncil
488
- uv sync
489
- uv run dev --help
490
- ```
491
-
492
- ---
493
-
494
- ## CLI Command Reference
495
-
496
- ```bash
497
- dev init # Initialize DevCouncil in a repo
498
- dev setup # Initialize, run doctor, and print next steps
499
- dev doctor # Check dependencies and environment
500
- dev version # Display the installed DevCouncil version
501
- dev map "goal" # Map repo context for a goal
502
- dev plan "goal" # Run the full planning council debate
503
- dev status # Show current project state and cost
504
- dev tasks # List planned tasks and statuses
505
- dev show TASK-001 # Show task details and constraints
506
- dev prompt TASK-001 # Generate prompt for an external agent
507
- dev run TASK-001 # Execute task via selected executor
508
- dev verify TASK-001 # Verify diff, commands, and evidence
509
- dev repair # Generate repair tasks from gaps
510
- dev report # Generate final evidence report
511
- dev rollback TASK-001 # Revert changes using task checkpoint
512
- dev mcp-server # Start DevCouncil MCP server over stdio
513
- dev hook --help # Show experimental Claude Code hook commands
514
- dev integrate all --apply # Configure supported coding CLI integrations
515
- dev integrate check # Verify coding CLI and MCP readiness
516
- dev integrate doctor # Check optional integration tools
517
- dev trace tail --follow # Tail local DevCouncil trace events
518
- dev artifacts validate # Validate stored artifact integrity
519
- dev config # Inspect or update configuration
520
- ```
521
-
522
- ---
523
-
524
- ## Architecture
312
+ ## Project Shape
525
313
 
526
314
  DevCouncil implements a 7-phase software-team workflow:
527
315
 
528
- 1. **Goal analysis:** deterministic repository mapping and relevant context selection.
529
- 2. **Requirements drafting:** extraction of functional requirements and acceptance criteria.
530
- 3. **Council debate:** planner roles critique each other and an arbiter compiles a unified task graph.
531
- 4. **Gated execution:** tasks are scoped with allowed files and authorized commands.
532
- 5. **Deterministic verification:** the audit engine checks side effects, command evidence, and secret leaks.
533
- 6. **Repair loop:** blocking gaps are converted into focused repair tasks.
534
- 7. **Evidence reporting:** a final release-ready matrix proves requirement coverage.
316
+ 1. Goal analysis and repository mapping.
317
+ 2. Requirements drafting.
318
+ 3. Council debate and task arbitration.
319
+ 4. Gated execution with scoped files and commands.
320
+ 5. Deterministic verification.
321
+ 6. Repair-loop generation.
322
+ 7. Evidence reporting.
535
323
 
536
- ### Artifact Graph
324
+ Read [docs/architecture.md](docs/architecture.md) for the artifact graph, gating state machine, and component layout.
537
325
 
538
- ```mermaid
539
- graph TD;
540
- Requirement-->AcceptanceCriterion;
541
- Requirement-->Task;
542
- Task-->PlannedFile;
543
- Task-->ChangedFile;
544
- Task-->TestEvidence;
545
- Task-->CommandResult;
546
- Requirement-->Gap;
547
- Task-->Gap;
548
- ```
549
-
550
- ### Gating State Machine
551
-
552
- ```mermaid
553
- stateDiagram-v2
554
- [*] --> NEW
555
- NEW --> REPO_MAPPED
556
- REPO_MAPPED --> REQUIREMENTS_DRAFTED
557
- REQUIREMENTS_DRAFTED --> PLANS_GENERATED
558
- PLANS_GENERATED --> CRITIQUES_GENERATED
559
- CRITIQUES_GENERATED --> ARBITRATED
560
- ARBITRATED --> PLAN_APPROVED
561
- PLAN_APPROVED --> TASK_READY
562
-
563
- TASK_READY --> TASK_EXECUTING
564
- TASK_EXECUTING --> TASK_VERIFYING
565
-
566
- TASK_VERIFYING --> TASK_VERIFIED: Success
567
- TASK_VERIFYING --> TASK_BLOCKED: Failure
568
-
569
- TASK_BLOCKED --> TASK_READY: Repair
570
-
571
- TASK_VERIFIED --> TASK_READY: Next Task
572
- TASK_VERIFIED --> PROJECT_DONE: All Done
573
-
574
- PROJECT_DONE --> [*]
575
- ```
576
-
577
- ### How DevCouncil Differs From Sage
578
-
579
- **Sage** reviews an active coding-agent session and provides critique cards to help the developer course-correct.
580
-
581
- **DevCouncil** focuses on gated execution:
582
-
583
- - It creates a persistent requirement, task, diff, and evidence graph.
584
- - It blocks task completion when required evidence is missing.
585
- - It detects orphan diffs and unauthorized architectural changes.
586
- - It produces a deterministic evidence report for the final implementation.
587
-
588
- Sage asks: "Is this agent response good?" DevCouncil asks: "Can this task prove it satisfied the requirement?"
326
+ ## Contributions
589
327
 
590
- ---
591
-
592
- ## Project Status
593
-
594
- DevCouncil is early-stage and under active development.
595
-
596
- | Area | Status |
597
- | :--- | :--- |
598
- | **CLI & Storage** | Working: SQLite + SQLModel |
599
- | **Artifact Graph** | Working: coverage engine |
600
- | **Council Debate** | Working: multi-agent planning |
601
- | **Manual Executor** | Working: sidecar mode |
602
- | **Security Scanning** | Working: secret redaction and detection |
603
- | **Repair Loop** | Working: LLM-driven inference |
604
- | **Native Executor** | Experimental |
605
- | **MCP Server** | Experimental / starter |
606
- | **Claude Code Hooks** | Experimental / starter |
607
- | **GitHub PR Checks** | Starter: `dev report --github` |
608
-
609
- ---
610
-
611
- ## Security Model
612
-
613
- DevCouncil is designed to minimize unsafe agent behavior:
614
-
615
- - **Redaction:** strips secrets and API keys before sending context to LLMs.
616
- - **Permission guard:** prevents agents from accessing `.git`, `.env`, or sensitive credentials.
617
- - **Allowlist enforcement:** restricts writes to task-approved files and commands to a safe subset.
618
- - **Local sovereignty:** stores project state, logs, and artifacts locally in `.devcouncil/`.
619
-
620
- DevCouncil provides gates and evidence to make risky changes easier to detect. It does not replace human security review.
621
-
622
- ---
623
-
624
- ## Acknowledgements
625
-
626
- DevCouncil is built on the collective wisdom of the open-source agentic community:
328
+ Project ideas and execution patterns come from the open-source ecosystem:
627
329
 
330
+ - [Sage](https://github.com/usetig/sage): peer-review-first model for planning and critique.
628
331
  - [karpathy/llm-council](https://github.com/karpathy/llm-council): for the multi-LLM peer-review pattern.
629
- - [GPT Pilot](https://github.com/Pythagora-io/gpt-pilot): for the software-team role-based concept.
630
- - [OpenHands](https://github.com/All-Hands-AI/OpenHands): for robust agent workspace and tool-loop management.
332
+ - [GPT Pilot](https://github.com/Pythagora-io/gpt-pilot): for role-based software-team concept.
333
+ - [astral-sh/uv](https://github.com/astral-sh/uv): for reproducible Python package/runtime workflows.
334
+ - [OpenHands](https://github.com/All-Hands-AI/OpenHands): for workspace-aware agent execution patterns.
631
335
  - [mini-SWE-agent](https://github.com/SWE-agent/mini-swe-agent): for lightweight execution loop inspiration.
632
- - [abhigyanpatwari/GitNexus](https://github.com/abhigyanpatwari/GitNexus): for structural codebase awareness.
633
- - [safishamsi/graphify](https://github.com/safishamsi/graphify): for knowledge graph and multi-agent coordination.
634
-
635
- ---
336
+ - [SWE-agent](https://github.com/SWE-agent/SWE-agent): for full-spectrum autonomous SWE-style tasking patterns.
337
+ - [GitNexus](https://github.com/abhigyanpatwari/GitNexus): for structural codebase awareness.
338
+ - [graphify](https://github.com/safishamsi/graphify): for knowledge-graph-based coordination concepts.
636
339
 
637
340
  ## License
638
341