devcouncil 0.1.1 → 0.3.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 (159) hide show
  1. package/README.md +201 -6
  2. package/package.json +9 -2
  3. package/pyproject.toml +34 -2
  4. package/src/devcouncil/app/config.py +348 -12
  5. package/src/devcouncil/app/orchestrator.py +10 -6
  6. package/src/devcouncil/app/state_machine.py +4 -0
  7. package/src/devcouncil/artifacts/graph.py +32 -5
  8. package/src/devcouncil/assets/__init__.py +1 -0
  9. package/src/devcouncil/assets/devcouncil-logo.svg +60 -0
  10. package/src/devcouncil/assets/devcouncil_logo_premium.png +0 -0
  11. package/src/devcouncil/cli/commands/agents.py +292 -0
  12. package/src/devcouncil/cli/commands/artifacts.py +6 -3
  13. package/src/devcouncil/cli/commands/check.py +220 -0
  14. package/src/devcouncil/cli/commands/config.py +43 -4
  15. package/src/devcouncil/cli/commands/cost.py +57 -0
  16. package/src/devcouncil/cli/commands/dashboard.py +6 -1
  17. package/src/devcouncil/cli/commands/design.py +186 -0
  18. package/src/devcouncil/cli/commands/doctor.py +379 -22
  19. package/src/devcouncil/cli/commands/evidence.py +48 -0
  20. package/src/devcouncil/cli/commands/go.py +532 -33
  21. package/src/devcouncil/cli/commands/handoff.py +69 -0
  22. package/src/devcouncil/cli/commands/hook.py +296 -15
  23. package/src/devcouncil/cli/commands/init.py +161 -20
  24. package/src/devcouncil/cli/commands/integrate.py +1371 -124
  25. package/src/devcouncil/cli/commands/logs.py +106 -0
  26. package/src/devcouncil/cli/commands/map.py +80 -10
  27. package/src/devcouncil/cli/commands/okf.py +245 -0
  28. package/src/devcouncil/cli/commands/plan.py +256 -55
  29. package/src/devcouncil/cli/commands/prompt.py +18 -7
  30. package/src/devcouncil/cli/commands/repair.py +50 -24
  31. package/src/devcouncil/cli/commands/report.py +8 -0
  32. package/src/devcouncil/cli/commands/reset_demo_state.py +4 -2
  33. package/src/devcouncil/cli/commands/rollback.py +27 -28
  34. package/src/devcouncil/cli/commands/run.py +195 -54
  35. package/src/devcouncil/cli/commands/runs.py +223 -0
  36. package/src/devcouncil/cli/commands/scaffold.py +32 -0
  37. package/src/devcouncil/cli/commands/semantic.py +47 -0
  38. package/src/devcouncil/cli/commands/setup.py +145 -6
  39. package/src/devcouncil/cli/commands/shell.py +73 -0
  40. package/src/devcouncil/cli/commands/skills.py +267 -0
  41. package/src/devcouncil/cli/commands/status.py +30 -15
  42. package/src/devcouncil/cli/commands/trace.py +47 -3
  43. package/src/devcouncil/cli/commands/verify.py +144 -3
  44. package/src/devcouncil/cli/commands/watch.py +32 -12
  45. package/src/devcouncil/cli/commands/watch_fs.py +40 -0
  46. package/src/devcouncil/cli/main.py +91 -7
  47. package/src/devcouncil/domain/evidence.py +29 -2
  48. package/src/devcouncil/domain/gap.py +27 -1
  49. package/src/devcouncil/domain/task.py +31 -2
  50. package/src/devcouncil/execution/checkpoints.py +256 -0
  51. package/src/devcouncil/execution/context_builder.py +1 -1
  52. package/src/devcouncil/execution/fs_watcher.py +205 -0
  53. package/src/devcouncil/execution/handoff.py +102 -0
  54. package/src/devcouncil/execution/hook_policy.py +162 -74
  55. package/src/devcouncil/execution/patch.py +65 -10
  56. package/src/devcouncil/execution/permissions.py +24 -24
  57. package/src/devcouncil/execution/policy_engine.py +350 -0
  58. package/src/devcouncil/execution/prompt_builder.py +751 -23
  59. package/src/devcouncil/execution/shell_session.py +231 -0
  60. package/src/devcouncil/execution/task_runner.py +24 -9
  61. package/src/devcouncil/executors/agent_registry.py +596 -0
  62. package/src/devcouncil/executors/coding_cli.py +791 -39
  63. package/src/devcouncil/executors/mini_swe.py +6 -0
  64. package/src/devcouncil/executors/native/agent.py +135 -19
  65. package/src/devcouncil/executors/openhands.py +6 -0
  66. package/src/devcouncil/gating/checks/clean_git.py +3 -1
  67. package/src/devcouncil/gating/checks/secret_scan_check.py +47 -21
  68. package/src/devcouncil/gating/policy.py +190 -11
  69. package/src/devcouncil/hardware.py +184 -0
  70. package/src/devcouncil/indexing/ast_matcher.py +17 -7
  71. package/src/devcouncil/indexing/lsp.py +45 -4
  72. package/src/devcouncil/indexing/repo_mapper.py +1284 -15
  73. package/src/devcouncil/indexing/semantic_index.py +221 -0
  74. package/src/devcouncil/integrations/actions.py +166 -0
  75. package/src/devcouncil/integrations/check.py +426 -0
  76. package/src/devcouncil/integrations/claude_assets.py +444 -0
  77. package/src/devcouncil/integrations/code_review_graph.py +13 -2
  78. package/src/devcouncil/integrations/github_intent.py +149 -0
  79. package/src/devcouncil/integrations/gitnexus.py +45 -2
  80. package/src/devcouncil/integrations/mcp/server.py +1944 -32
  81. package/src/devcouncil/integrations/opencode_devcouncil_plugin.mjs +24 -0
  82. package/src/devcouncil/integrations/pr_comments.py +9 -0
  83. package/src/devcouncil/knowledge/__init__.py +23 -0
  84. package/src/devcouncil/knowledge/design.py +374 -0
  85. package/src/devcouncil/knowledge/design_conformance.py +317 -0
  86. package/src/devcouncil/knowledge/fetch.py +223 -0
  87. package/src/devcouncil/knowledge/frontmatter.py +51 -0
  88. package/src/devcouncil/knowledge/okf.py +202 -0
  89. package/src/devcouncil/knowledge/skill_bridge.py +96 -0
  90. package/src/devcouncil/knowledge/sources.py +239 -0
  91. package/src/devcouncil/live/cards.py +181 -25
  92. package/src/devcouncil/live/repair_prompt.py +29 -6
  93. package/src/devcouncil/live/reviewer.py +72 -13
  94. package/src/devcouncil/live/signals.py +2 -2
  95. package/src/devcouncil/live/summary.py +18 -8
  96. package/src/devcouncil/live/transcripts.py +47 -11
  97. package/src/devcouncil/llm/cache.py +20 -8
  98. package/src/devcouncil/llm/model_defaults.yaml +44 -0
  99. package/src/devcouncil/llm/provider.py +617 -49
  100. package/src/devcouncil/llm/router.py +337 -53
  101. package/src/devcouncil/optimization/__init__.py +1 -0
  102. package/src/devcouncil/optimization/gepa_agent.py +318 -0
  103. package/src/devcouncil/optimization/skillopt.py +673 -0
  104. package/src/devcouncil/planning/arbiter_service.py +10 -2
  105. package/src/devcouncil/planning/correction_manifest.py +346 -0
  106. package/src/devcouncil/planning/critique_service.py +16 -4
  107. package/src/devcouncil/planning/plan_service.py +86 -6
  108. package/src/devcouncil/planning/prompt_enhancer_service.py +206 -1
  109. package/src/devcouncil/planning/repair_service.py +8 -2
  110. package/src/devcouncil/planning/spec_service.py +37 -3
  111. package/src/devcouncil/repo/ci_scaffold.py +165 -0
  112. package/src/devcouncil/repo/gitignore.py +123 -0
  113. package/src/devcouncil/repo/sca.py +384 -0
  114. package/src/devcouncil/reporting/json_report.py +22 -1
  115. package/src/devcouncil/reporting/markdown_report.py +29 -1
  116. package/src/devcouncil/reporting/okf_bundle_writer.py +364 -0
  117. package/src/devcouncil/reporting/okf_html.py +323 -0
  118. package/src/devcouncil/reporting/report_builder.py +18 -1
  119. package/src/devcouncil/skills/__init__.py +19 -0
  120. package/src/devcouncil/skills/library/README.md +46 -0
  121. package/src/devcouncil/skills/library/ai-training.md +50 -0
  122. package/src/devcouncil/skills/library/android.md +50 -0
  123. package/src/devcouncil/skills/library/backend.md +52 -0
  124. package/src/devcouncil/skills/library/core-engineering.md +95 -0
  125. package/src/devcouncil/skills/library/data-engineering.md +47 -0
  126. package/src/devcouncil/skills/library/desktop.md +46 -0
  127. package/src/devcouncil/skills/library/devops.md +48 -0
  128. package/src/devcouncil/skills/library/game-dev.md +46 -0
  129. package/src/devcouncil/skills/library/ios.md +48 -0
  130. package/src/devcouncil/skills/library/mobile-cross-platform.md +46 -0
  131. package/src/devcouncil/skills/library/security.md +48 -0
  132. package/src/devcouncil/skills/library/systems.md +48 -0
  133. package/src/devcouncil/skills/library/web.md +47 -0
  134. package/src/devcouncil/skills/library/windows.md +47 -0
  135. package/src/devcouncil/skills/registry.py +408 -0
  136. package/src/devcouncil/storage/db.py +140 -3
  137. package/src/devcouncil/storage/models.py +125 -0
  138. package/src/devcouncil/storage/native.py +559 -0
  139. package/src/devcouncil/storage/repositories.py +157 -78
  140. package/src/devcouncil/telemetry/cost.py +123 -17
  141. package/src/devcouncil/telemetry/logging_setup.py +244 -0
  142. package/src/devcouncil/telemetry/model_pricing.yaml +48 -0
  143. package/src/devcouncil/telemetry/pricing.py +28 -0
  144. package/src/devcouncil/telemetry/stages.py +141 -0
  145. package/src/devcouncil/telemetry/traces.py +62 -7
  146. package/src/devcouncil/telemetry/tracker.py +24 -10
  147. package/src/devcouncil/ui/dashboard.py +393 -28
  148. package/src/devcouncil/utils/redaction.py +9 -3
  149. package/src/devcouncil/utils/subprocess_env.py +69 -0
  150. package/src/devcouncil/verification/acceptance_compiler.py +253 -0
  151. package/src/devcouncil/verification/ad_hoc_check.py +135 -0
  152. package/src/devcouncil/verification/diff_coverage.py +353 -0
  153. package/src/devcouncil/verification/implementation_reviewer.py +11 -2
  154. package/src/devcouncil/verification/next_actions.py +189 -0
  155. package/src/devcouncil/verification/sandbox.py +181 -0
  156. package/src/devcouncil/verification/test_resolver.py +91 -0
  157. package/src/devcouncil/verification/verifier.py +1549 -143
  158. package/uv.lock +205 -64
  159. 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,16 +12,20 @@
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 does not 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.
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.
12
16
 
13
17
  ## Documentation
14
18
 
15
19
  - [Quickstart](docs/quickstart.md): shortest install-to-first-task path.
16
20
  - [Daily workflow](docs/workflow.md): manual sidecar loop, verification, repair, and rollback.
17
- - [Coding CLI integration](docs/coding-cli-integration.md): Codex, Gemini, Claude Code, Cursor, Aider, MCP, hooks, and automated executors.
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.
18
23
  - [CLI command reference](docs/cli-reference.md): available `dev` commands.
19
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.
20
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
+ - [Knowledge formats](docs/knowledge-formats.md): Open Knowledge Format (OKF) export/ingest/browse (`dev okf html` renders a bundle as a self-contained static HTML site) and design.md design-system lint/export plus `dev design check` (a CI-friendly gate that fails on hardcoded color/spacing/typography literals bypassing the tokens), injected as planning and coding context, plus the bidirectional OKF <-> engineering-skills bridge (`dev okf export --skills` / `dev okf ingest`).
21
29
  - [Security model](docs/security.md): redaction, permissions, allowlists, and local state.
22
30
  - [Project status](docs/project-status.md): current maturity by subsystem.
23
31
  - [Roadmap](docs/roadmap.md): planned work.
@@ -73,12 +81,27 @@ dev verify TASK-001
73
81
 
74
82
  On a fresh interactive setup, DevCouncil can configure supported coding CLI integrations immediately; pass `--skip-integrations` if you want to defer that step.
75
83
 
76
- 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.
84
+ ### Run locally on macOS (Apple Silicon + Ollama)
85
+
86
+ 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.
87
+
88
+ ```bash
89
+ brew install ollama && ollama serve
90
+ ollama pull qwen2.5-coder:32b # use the size `dev doctor` recommends for your RAM
91
+ export OLLAMA_NUM_CTX=16384 # large planning prompts need a raised context window
92
+ dev setup --provider ollama # auto-selects the model for your RAM
93
+ ```
94
+
95
+ See [Model routing → macOS / Apple Silicon](docs/model-routing.md) for the RAM-to-model table.
96
+
97
+ 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.
77
98
 
78
99
  For an automated end-to-end run with a supported coding CLI installed:
79
100
 
80
101
  ```bash
81
102
  dev e2e "Describe the implementation goal" --executor codex
103
+ dev e2e "Describe the implementation goal" --executor antigravity
104
+ dev e2e "Describe the implementation goal" --executor warp
82
105
  dev go "Describe the implementation goal" --executor codex
83
106
  ```
84
107
 
@@ -87,14 +110,142 @@ dev go "Describe the implementation goal" --executor codex
87
110
  For machine-readable agent handoff, write the final report to a stable file:
88
111
 
89
112
  ```bash
90
- dev e2e "Describe the implementation goal" --agent
91
- dev e2e "Describe the implementation goal" --json --report-file .devcouncil/reports/latest.json
113
+ dev e2e "Describe the implementation goal" --executor codex --agent
114
+ dev e2e "Describe the implementation goal" --executor codex --json --report-file .devcouncil/reports/latest.json
92
115
  ```
93
116
 
94
- `--agent` is the lowest-friction integration preset. It enables JSON output and writes `.devcouncil/reports/latest.json`.
117
+ `--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`.
95
118
 
96
119
  See the full [quickstart](docs/quickstart.md) for installation variants, API-key setup, and first-run guidance.
97
120
 
121
+ OpenCode and Google Antigravity CLI are built-in executors and MCP integrations:
122
+
123
+ ```bash
124
+ dev integrate opencode --apply
125
+ dev run TASK-001 --executor opencode
126
+ dev agents run TASK-001 --agent opencode --profile default
127
+ dev integrate antigravity --apply
128
+ dev run TASK-001 --executor antigravity
129
+ dev agents run TASK-001 --agent agy --profile default
130
+ ```
131
+
132
+ 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:
133
+
134
+ ```bash
135
+ dev agents add myagent --command myagent --arg run --input-mode prompt-file --prompt-arg=--prompt-file --supports-mcp
136
+ dev agents
137
+ dev agents doctor
138
+ dev agents run TASK-001 --agent myagent --profile default
139
+ ```
140
+
141
+ GEPA prompt-profile optimization is available for the agent hub:
142
+
143
+ ```bash
144
+ dev agents optimize --agent codex --profile yolo --evals .devcouncil/evals/agent-profile.jsonl --dry-run
145
+ dev agents optimize --agent codex --profile yolo --evals .devcouncil/evals/agent-profile.jsonl --apply
146
+ ```
147
+
148
+ ## Feature Set
149
+
150
+ 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.
151
+
152
+ ### Workflow Features
153
+
154
+ - **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.
155
+ - **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.
156
+ - **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.
157
+ - **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`.
158
+ - **Planning council:** `dev plan` turns a goal into requirements, acceptance criteria, assumptions, critique findings, and executable tasks.
159
+ - **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).
160
+ - **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.
161
+ - **Execution:** `dev run TASK-001` supports manual sidecar mode, built-in coding CLI executors, external executors, and registered custom CLI agents.
162
+ - **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.
163
+ - **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 `$?`.
164
+ - **Repair:** `dev repair` converts blocking gaps into focused follow-up work instead of leaving failures as vague test output.
165
+ - **Rollback:** `dev rollback TASK-001` uses task checkpoints to revert scoped work when a task needs to be backed out.
166
+ - **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.
167
+
168
+ ### App Surfaces
169
+
170
+ - **CLI:** `dev` and `devcouncil` expose the same Typer command surface for local terminal workflows.
171
+ - **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.
172
+ - **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.
173
+ - **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.
174
+ - **Live review:** `dev watch` tracks review cards, signals, blocking feedback, and repair guidance while a session is active.
175
+ - **Trace viewer:** `dev trace tail --follow` streams local DevCouncil trace events for execution, verification, and agent handoff.
176
+ - **Dashboard:** `dev dashboard --open` serves a local status dashboard and opens it in the default browser for project state and live workflow visibility.
177
+ - **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 `$?`.
178
+ - **Config editor:** `dev config` and `dev config models` inspect/update provider, model, executor, and command configuration.
179
+ - **Artifact tools:** `dev artifacts validate` checks stored graph integrity.
180
+ - **Code intelligence:** `dev lsp inspect` checks optional language-server readiness, and `dev ast match` searches code structurally.
181
+ - **Doctor:** `dev doctor` validates local dependencies, commands, and environment prerequisites before a workflow fails deeper in execution.
182
+
183
+ ### Agent And Executor Support
184
+
185
+ DevCouncil works with human-in-the-loop sidecar sessions and automated prompt handoff:
186
+
187
+ - **Manual sidecar:** paste `dev prompt TASK-001` into any agent, then run `dev verify TASK-001`.
188
+ - **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`.
189
+ - **Custom CLI agents:** register any prompt-taking command with stdin, argument, or prompt-file handoff.
190
+ - **Execution profiles:** custom agents can use profiles such as `default`, `yolo`, and `prod` to adjust prompt constraints while DevCouncil still verifies the final diff.
191
+ - **External automated adapters:** `mini`, `openhands`, `native-preview`, and `native` are available when the corresponding local executor is configured.
192
+ - **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.
193
+
194
+ ### Gates And Evidence
195
+
196
+ DevCouncil blocks completion on concrete gaps rather than model confidence:
197
+
198
+ - **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.
199
+ - **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.
200
+ - **Diff gates:** verification detects files changed outside the planned task scope, dependency-file edits made without authorization, deleted/added files, and untracked file diffs.
201
+ - **Evidence gates:** passing evidence commands are linked back to acceptance criteria; missing passing evidence becomes a blocking gap.
202
+ - **Security gates:** secret scanning runs over captured diffs, and command output is redacted before it is written to logs.
203
+ - **Live-review gates:** unresolved critical review cards can block task verification and appear in reports.
204
+
205
+ ### Providers, Models, And Cost Tracking
206
+
207
+ - **Providers:** OpenRouter, Vertex AI, Doubleword, and Ollama (local, no key) are supported through local configuration and secrets.
208
+ - **Role models:** planner, critic, arbiter, reviewer, and repair roles can share one model or use per-role overrides.
209
+ - **Structured repair:** model routing includes JSON repair paths for structured planning and review outputs.
210
+ - **Model defaults:** packaged YAML defaults ship with the tool so installed CLI environments do not depend on source-tree-only files.
211
+ - **Telemetry:** local trace and cost data feed `dev status`, reports, and dashboard surfaces.
212
+
213
+ ### Reports And Automation Outputs
214
+
215
+ - **Markdown reports:** include verdict, coverage summary, requirement/task mapping, blocking gaps, and live-review status.
216
+ - **JSON reports:** `--json` and `--report-file` support machine-readable handoff to other automation.
217
+ - **Agent preset:** `--agent` writes `.devcouncil/reports/latest.json` for stable downstream consumption.
218
+ - **PR comments:** `dev report --github-pr-comment` and `dev report --gitlab-pr-comment` can publish verification summaries to pull/merge requests.
219
+ - **GitHub checks:** preview GitHub report/check surfaces are available for repository automation.
220
+
221
+ ### Local State And Files
222
+
223
+ DevCouncil stores local workflow state in the target repository:
224
+
225
+ - `.devcouncil/config.yaml`: provider, executor, command, integration, and workflow settings.
226
+ - `.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.
227
+ - `.devcouncil/repo_map.json`: generated repository map and subsystem navigation index.
228
+ - `.devcouncil/state.sqlite`: SQLite state for requirements, assumptions, tasks, evidence, gaps, critique findings, and project phase history.
229
+ - `.devcouncil/checkpoints/`: task snapshots used by verification and rollback.
230
+ - `.devcouncil/logs/`: the durable run log (`devcouncil.log`, rotating, DEBUG-level) plus redacted stdout/stderr from verification commands.
231
+ - `.devcouncil/runs/<run-id>/run.log`: the full per-run log isolated to a single executor run.
232
+ - `.devcouncil/runs/<run-id>/agent-run.json`: prompt, executor, profile, exit status, and run metadata for automated agent executions.
233
+ - `.devcouncil/reports/latest.json`: optional machine-readable report generated by `dev e2e --agent`.
234
+ - `.devcouncil/integrations/` and `.agents/`: generated integration files such as Warp/Oz MCP JSON and Antigravity MCP config.
235
+
236
+ ### Logging & diagnostics
237
+
238
+ Every command logs each stage and step. The full DEBUG trail always lands in `.devcouncil/logs/devcouncil.log` (rotating), each executor run also gets an isolated `.devcouncil/runs/<run-id>/run.log`, and uncaught crashes are captured there with a full traceback. The console stays quiet by default — raise it per command:
239
+
240
+ - `dev <command> -v` (INFO) or `-vv` (DEBUG); `-q` for errors only; `--log-level DEBUG`. The `DEVCOUNCIL_LOG_LEVEL` env var sets a default.
241
+ - `dev logs tail [-n N] [-f] [--grep TEXT]` — read/follow/filter the shared log.
242
+ - `dev logs tail --run <run-id>` — read one run's log; `dev logs runs` lists them; `dev logs path` prints the location.
243
+ - `dev doctor` reports the log location and size.
244
+
245
+ ### Maturity
246
+
247
+ 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.
248
+
98
249
  ## Core Flow
99
250
 
100
251
  DevCouncil's recommended default is **Manual Sidecar Mode**:
@@ -108,6 +259,50 @@ DevCouncil's recommended default is **Manual Sidecar Mode**:
108
259
 
109
260
  The detailed task-by-task workflow lives in [docs/workflow.md](docs/workflow.md).
110
261
 
262
+ ## How The Repo Runs
263
+
264
+ ```mermaid
265
+ flowchart TD
266
+ user["User runs dev/devcouncil"] --> cli["Typer CLI\nsrc/devcouncil/cli/main.py"]
267
+ cli --> config["Config + secrets\n.devcouncil/config.yaml\n.devcouncil/secrets.env"]
268
+ cli --> map["Repo map\nsrc/devcouncil/indexing/repo_mapper.py"]
269
+ cli --> planning["Planning commands\ndev plan / dev prompt / dev tasks"]
270
+
271
+ config --> providers["Model providers\nOpenRouter, Vertex AI, Doubleword, or Ollama"]
272
+ providers --> router["ModelRouter\nrole models, cache, telemetry, structured JSON repair"]
273
+ router --> planning
274
+
275
+ planning --> storage["SQLite + repositories\nrequirements, tasks, gaps, evidence, state"]
276
+ storage --> artifactGraph["Artifact graph\nRequirement -> Task -> Diff -> Evidence"]
277
+ artifactGraph --> gates["Gate policy\nplanned files, commands, secret checks"]
278
+
279
+ gates --> manual["Manual sidecar\ndev prompt + user agent edits"]
280
+ gates --> coding["Coding CLI executor\nCodex, Gemini, Claude, OpenCode, Antigravity, Warp, custom CLIs"]
281
+ gates --> native["Native preview executor\nLLM router + TaskRunner"]
282
+ gates --> external["Mini-SWE / OpenHands adapters"]
283
+
284
+ coding --> runlog["Run artifacts\nprompt file, redacted logs, manifest, trace events"]
285
+ native --> runlog
286
+ external --> runlog
287
+ manual --> diff["Repository diff"]
288
+ runlog --> diff
289
+
290
+ diff --> verify["Verifier\ndev verify / automatic post-run verification"]
291
+ verify --> evidence["Evidence + gaps"]
292
+ evidence --> storage
293
+ evidence --> repair["Repair loop\ndev repair / dev watch repair"]
294
+ evidence --> report["Reports\ndev report, JSON, GitHub/GitLab comments"]
295
+
296
+ cli --> mcp["MCP server\ndev mcp-server"]
297
+ mcp --> storage
298
+ mcp --> artifactGraph
299
+ mcp --> repair
300
+
301
+ cli --> live["Live review\ndev watch"]
302
+ live --> cards["Cards + signals\nblocking review feedback"]
303
+ cards --> report
304
+ ```
305
+
111
306
  ## Install From Source
112
307
 
113
308
  For local development inside this checkout:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devcouncil",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Gated orchestrator for AI-assisted software development",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/bharathvbcr/DevCouncil#readme",
@@ -27,6 +27,10 @@
27
27
  "bin/",
28
28
  "src/**/*.py",
29
29
  "src/**/*.md",
30
+ "src/**/*.png",
31
+ "src/**/*.svg",
32
+ "src/**/*.yaml",
33
+ "src/**/*.mjs",
30
34
  "pyproject.toml",
31
35
  "uv.lock",
32
36
  "README.md",
@@ -37,9 +41,12 @@
37
41
  "install:editable": "uv pip install -e .",
38
42
  "dev": "uv run devcouncil",
39
43
  "pack:check": "npm pack --dry-run",
44
+ "smoke:wheel": "uv run python scripts/check-wheel-assets.py",
45
+ "smoke:package": "node scripts/npm-runtime-smoke.mjs",
40
46
  "test": "uv run pytest",
41
47
  "lint": "uv run ruff check .",
42
- "check": "uv run ruff check . && uv run pytest"
48
+ "typecheck": "uv run mypy src",
49
+ "check": "uv run ruff check . && uv run mypy src && uv run pytest"
43
50
  },
44
51
  "engines": {
45
52
  "node": ">=18"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devcouncil"
3
- version = "0.1.1"
3
+ version = "0.3.0"
4
4
  description = "Gated orchestrator for AI-assisted software development"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -11,10 +11,17 @@ dependencies = [
11
11
  "pyyaml>=6.0.1",
12
12
  "sqlmodel>=0.0.19",
13
13
  "httpx>=0.27.0",
14
- "gitpython>=3.1.43",
14
+ "gitpython>=3.1.49",
15
15
  "mcp>=1.27.0",
16
+ "gepa>=0.1.1",
17
+ "watchdog>=4.0.0",
16
18
  ]
17
19
 
20
+ [project.urls]
21
+ Homepage = "https://github.com/bharathvbcr/DevCouncil"
22
+ Repository = "https://github.com/bharathvbcr/DevCouncil.git"
23
+ Issues = "https://github.com/bharathvbcr/DevCouncil/issues"
24
+
18
25
  [project.scripts]
19
26
  dev = "devcouncil.cli.main:app"
20
27
  devcouncil = "devcouncil.cli.main:app"
@@ -24,6 +31,24 @@ dev = [
24
31
  "pytest>=8.2.0",
25
32
  "ruff>=0.4.4",
26
33
  "mypy>=1.10.0",
34
+ "types-pyyaml>=6.0.12.20260408",
35
+ # Used only to exercise the diff↔coverage path end-to-end in tests. DevCouncil
36
+ # never requires coverage at runtime — it uses whatever the target repo provides.
37
+ "coverage>=7.4",
38
+ ]
39
+
40
+ [tool.uv]
41
+ # Security floors for transitive dependencies (Dependabot advisories, 2026-06).
42
+ # These are not direct deps; constraint-dependencies pins their minimum patched
43
+ # version in the resolver without adding them to the dependency tree, so they can
44
+ # never resolve back below the fix.
45
+ constraint-dependencies = [
46
+ "cryptography>=48.0.1",
47
+ "starlette>=1.3.1",
48
+ "pyjwt>=2.13.0",
49
+ "python-multipart>=0.0.31",
50
+ "pydantic-settings>=2.14.2",
51
+ "idna>=3.15",
27
52
  ]
28
53
 
29
54
  [tool.pytest.ini_options]
@@ -32,3 +57,10 @@ testpaths = ["tests"]
32
57
  [build-system]
33
58
  requires = ["hatchling"]
34
59
  build-backend = "hatchling.build"
60
+
61
+ [tool.hatch.build.targets.wheel.force-include]
62
+ "src/devcouncil/llm/model_defaults.yaml" = "devcouncil/llm/model_defaults.yaml"
63
+ "src/devcouncil/telemetry/model_pricing.yaml" = "devcouncil/telemetry/model_pricing.yaml"
64
+ "src/devcouncil/assets/devcouncil-logo.svg" = "devcouncil/assets/devcouncil-logo.svg"
65
+ "src/devcouncil/assets/devcouncil_logo_premium.png" = "devcouncil/assets/devcouncil_logo_premium.png"
66
+ "src/devcouncil/integrations/opencode_devcouncil_plugin.mjs" = "devcouncil/integrations/opencode_devcouncil_plugin.mjs"