devcouncil 0.1.1 → 0.2.1
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.
- package/README.md +218 -96
- package/bin/devcouncil.js +130 -32
- package/package.json +7 -11
- package/pyproject.toml +0 -34
- package/src/devcouncil/__init__.py +0 -0
- package/src/devcouncil/__main__.py +0 -4
- package/src/devcouncil/app/__init__.py +0 -28
- package/src/devcouncil/app/config.py +0 -158
- package/src/devcouncil/app/errors.py +0 -23
- package/src/devcouncil/app/events.py +0 -44
- package/src/devcouncil/app/orchestrator.py +0 -92
- package/src/devcouncil/app/project_status.py +0 -29
- package/src/devcouncil/app/run_context.py +0 -39
- package/src/devcouncil/app/state_machine.py +0 -108
- package/src/devcouncil/artifacts/__init__.py +0 -1
- package/src/devcouncil/artifacts/coverage.py +0 -96
- package/src/devcouncil/artifacts/graph.py +0 -143
- package/src/devcouncil/artifacts/migrations.py +0 -20
- package/src/devcouncil/artifacts/schemas.py +0 -23
- package/src/devcouncil/artifacts/serializer.py +0 -21
- package/src/devcouncil/artifacts/validators.py +0 -27
- package/src/devcouncil/cli/__init__.py +0 -0
- package/src/devcouncil/cli/commands/__init__.py +0 -0
- package/src/devcouncil/cli/commands/artifacts.py +0 -51
- package/src/devcouncil/cli/commands/ast.py +0 -22
- package/src/devcouncil/cli/commands/baseline.py +0 -35
- package/src/devcouncil/cli/commands/config.py +0 -76
- package/src/devcouncil/cli/commands/dashboard.py +0 -26
- package/src/devcouncil/cli/commands/doctor.py +0 -140
- package/src/devcouncil/cli/commands/go.py +0 -237
- package/src/devcouncil/cli/commands/hook.py +0 -128
- package/src/devcouncil/cli/commands/init.py +0 -153
- package/src/devcouncil/cli/commands/integrate.py +0 -726
- package/src/devcouncil/cli/commands/lsp.py +0 -20
- package/src/devcouncil/cli/commands/map.py +0 -42
- package/src/devcouncil/cli/commands/mcp_server.py +0 -18
- package/src/devcouncil/cli/commands/plan.py +0 -327
- package/src/devcouncil/cli/commands/prompt.py +0 -50
- package/src/devcouncil/cli/commands/repair.py +0 -72
- package/src/devcouncil/cli/commands/report.py +0 -129
- package/src/devcouncil/cli/commands/reset_demo_state.py +0 -31
- package/src/devcouncil/cli/commands/rollback.py +0 -60
- package/src/devcouncil/cli/commands/run.py +0 -269
- package/src/devcouncil/cli/commands/setup.py +0 -223
- package/src/devcouncil/cli/commands/show.py +0 -76
- package/src/devcouncil/cli/commands/status.py +0 -117
- package/src/devcouncil/cli/commands/tasks.py +0 -55
- package/src/devcouncil/cli/commands/trace.py +0 -44
- package/src/devcouncil/cli/commands/verify.py +0 -193
- package/src/devcouncil/cli/commands/version.py +0 -20
- package/src/devcouncil/cli/commands/watch.py +0 -574
- package/src/devcouncil/cli/main.py +0 -88
- package/src/devcouncil/council/__init__.py +0 -0
- package/src/devcouncil/council/prompts/__init__.py +0 -0
- package/src/devcouncil/council/prompts/arbiter.md +0 -19
- package/src/devcouncil/council/prompts/critic_a.md +0 -10
- package/src/devcouncil/council/prompts/critic_b.md +0 -10
- package/src/devcouncil/council/prompts/implementation_reviewer.md +0 -16
- package/src/devcouncil/council/prompts/planner_a.md +0 -16
- package/src/devcouncil/council/prompts/planner_b.md +0 -16
- package/src/devcouncil/council/prompts/rebuttal.md +0 -10
- package/src/devcouncil/council/prompts/spec_writer.md +0 -12
- package/src/devcouncil/domain/__init__.py +0 -0
- package/src/devcouncil/domain/assumption.py +0 -17
- package/src/devcouncil/domain/critique.py +0 -32
- package/src/devcouncil/domain/evidence.py +0 -27
- package/src/devcouncil/domain/gap.py +0 -26
- package/src/devcouncil/domain/requirement.py +0 -22
- package/src/devcouncil/domain/task.py +0 -26
- package/src/devcouncil/execution/__init__.py +0 -1
- package/src/devcouncil/execution/context_builder.py +0 -60
- package/src/devcouncil/execution/executor.py +0 -15
- package/src/devcouncil/execution/hook_policy.py +0 -165
- package/src/devcouncil/execution/patch.py +0 -28
- package/src/devcouncil/execution/paths.py +0 -14
- package/src/devcouncil/execution/permissions.py +0 -92
- package/src/devcouncil/execution/prompt_builder.py +0 -59
- package/src/devcouncil/execution/task_runner.py +0 -166
- package/src/devcouncil/executors/__init__.py +0 -1
- package/src/devcouncil/executors/coding_cli.py +0 -112
- package/src/devcouncil/executors/mini_swe.py +0 -73
- package/src/devcouncil/executors/native/__init__.py +0 -0
- package/src/devcouncil/executors/native/agent.py +0 -107
- package/src/devcouncil/executors/openhands.py +0 -71
- package/src/devcouncil/gating/__init__.py +0 -1
- package/src/devcouncil/gating/checks/__init__.py +0 -0
- package/src/devcouncil/gating/checks/clean_git.py +0 -50
- package/src/devcouncil/gating/checks/planned_files_check.py +0 -32
- package/src/devcouncil/gating/checks/requirement_coverage.py +0 -26
- package/src/devcouncil/gating/checks/secret_scan_check.py +0 -34
- package/src/devcouncil/gating/policy.py +0 -190
- package/src/devcouncil/indexing/__init__.py +0 -1
- package/src/devcouncil/indexing/ast_matcher.py +0 -168
- package/src/devcouncil/indexing/graph_index.py +0 -48
- package/src/devcouncil/indexing/lsp.py +0 -120
- package/src/devcouncil/indexing/repo_mapper.py +0 -208
- package/src/devcouncil/indexing/symbol_index.py +0 -0
- package/src/devcouncil/integrations/code_review_graph.py +0 -163
- package/src/devcouncil/integrations/github.py +0 -39
- package/src/devcouncil/integrations/gitnexus.py +0 -27
- package/src/devcouncil/integrations/graphify.py +0 -34
- package/src/devcouncil/integrations/mcp/__init__.py +0 -0
- package/src/devcouncil/integrations/mcp/server.py +0 -599
- package/src/devcouncil/integrations/pr_comments.py +0 -62
- package/src/devcouncil/live/__init__.py +0 -2
- package/src/devcouncil/live/cards.py +0 -207
- package/src/devcouncil/live/models.py +0 -63
- package/src/devcouncil/live/repair_prompt.py +0 -83
- package/src/devcouncil/live/reviewer.py +0 -70
- package/src/devcouncil/live/signals.py +0 -135
- package/src/devcouncil/live/summary.py +0 -34
- package/src/devcouncil/live/tasks.py +0 -18
- package/src/devcouncil/live/transcripts.py +0 -138
- package/src/devcouncil/llm/__init__.py +0 -1
- package/src/devcouncil/llm/cache.py +0 -38
- package/src/devcouncil/llm/provider.py +0 -146
- package/src/devcouncil/llm/router.py +0 -125
- package/src/devcouncil/planning/__init__.py +0 -1
- package/src/devcouncil/planning/arbiter_service.py +0 -57
- package/src/devcouncil/planning/critique_service.py +0 -66
- package/src/devcouncil/planning/plan_service.py +0 -46
- package/src/devcouncil/planning/prompt_enhancer_service.py +0 -86
- package/src/devcouncil/planning/repair_service.py +0 -39
- package/src/devcouncil/planning/spec_service.py +0 -44
- package/src/devcouncil/repo/__init__.py +0 -0
- package/src/devcouncil/reporting/__init__.py +0 -0
- package/src/devcouncil/reporting/github_check.py +0 -32
- package/src/devcouncil/reporting/json_report.py +0 -20
- package/src/devcouncil/reporting/markdown_report.py +0 -68
- package/src/devcouncil/reporting/report_builder.py +0 -14
- package/src/devcouncil/storage/__init__.py +0 -0
- package/src/devcouncil/storage/db.py +0 -66
- package/src/devcouncil/storage/models.py +0 -83
- package/src/devcouncil/storage/repositories.py +0 -423
- package/src/devcouncil/telemetry/__init__.py +0 -0
- package/src/devcouncil/telemetry/cost.py +0 -34
- package/src/devcouncil/telemetry/traces.py +0 -91
- package/src/devcouncil/telemetry/tracker.py +0 -49
- package/src/devcouncil/ui/__init__.py +0 -1
- package/src/devcouncil/ui/dashboard.py +0 -122
- package/src/devcouncil/utils/__init__.py +0 -1
- package/src/devcouncil/utils/redaction.py +0 -141
- package/src/devcouncil/verification/__init__.py +0 -1
- package/src/devcouncil/verification/implementation_reviewer.py +0 -55
- package/src/devcouncil/verification/verifier.py +0 -530
- package/uv.lock +0 -1085
package/README.md
CHANGED
|
@@ -1,162 +1,284 @@
|
|
|
1
|
-
# DevCouncil:
|
|
1
|
+
# DevCouncil: Components and Modules for AI Development
|
|
2
2
|
|
|
3
|
+
[](https://devcouncil.vbcr.dev/)
|
|
4
|
+
[](https://github.com/bharathvbcr/DevCouncil/actions/workflows/ci.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/devcouncil)
|
|
3
6
|
[](LICENSE)
|
|
4
|
-
[](https://www.python.org/downloads/)
|
|
5
|
-
[](https://github.com/astral-sh/uv)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://devcouncil.vbcr.dev/"><strong>Explore the Interactive Architecture & Code Graph Showcase (devcouncil.vbcr.dev) →</strong></a>
|
|
10
|
+
</p>
|
|
8
11
|
|
|
9
|
-
DevCouncil
|
|
12
|
+
> **"DevCouncil should not merely generate code. It should make AI-generated work prove that it satisfied the original intent."**
|
|
13
|
+
> *Evidence, not model confidence, is the final authority.*
|
|
10
14
|
|
|
11
|
-
DevCouncil
|
|
15
|
+
DevCouncil is **components and modules** for AI-assisted software development. It ships independently installable binaries and libraries — code intelligence (`devmap`), task and lease state (`dcstore`), deterministic verification (`dcverify`), ignore-aware search (`dcgrep`), and a Go host (`devcouncil` / `dev`) — so a harness or an app can take only the pieces it needs and update them one at a time.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
See [repository input and verification boundaries](docs/SECURITY_BOUNDARIES.md)
|
|
18
|
+
for executable selection, filesystem protections, resource limits, and the
|
|
19
|
+
difference between unavailable evidence and a passing check.
|
|
20
|
+
|
|
21
|
+
**Manvi wraps these components** into a coding-agent harness (turn loop, providers, policy, TUI, `manvi serve`). **GitPulse** uses Manvi for policy, workbench, and agent hosting, and DevCouncil components for code intelligence and related analysis. DevCouncil does not replace coding agents; it sits beside Claude Code, Codex, Cursor, and others as selectable modules.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Architecture & Components
|
|
26
|
+
|
|
27
|
+
DevCouncil's core runtime is a set of standalone, compiled native modules. Each binary is useful on its own, sits on `PATH`, and can be spawned or linked by a host that wants that one job:
|
|
28
|
+
|
|
29
|
+
| Binary | Language | Role & Ownership |
|
|
30
|
+
|--------|----------|------------------|
|
|
31
|
+
| `devcouncil` / `dev` | **Go** | Host orchestrator: Stdio MCP server (`mcp`), multi-host agent integration (`integrate`), engineering skills distribution (`skills`), task verification (`verify`), and devmap forwarding (`map`, `graph`, `ast`). |
|
|
32
|
+
| `devmap` | **Rust** | Code intelligence engine: 36+ tree-sitter language extractors, symbol resolution, blast-radius calculation, dead-code analysis, workspace guides (`AGENTS.md`), and DevMap MCP server (`devmap mcp`). |
|
|
33
|
+
| `dcstore` | **Rust** | State & lease store: SQLite-backed task repository, mutual-exclusion leases for concurrent agent building, evidence records, and gap tracking. |
|
|
34
|
+
| `dcverify` | **Rust** | Deterministic verification: Unified-diff parsing, planned file scope classification, anti-laziness/stub gates, test coverage evaluation, and typed `next_actions` repair signals. |
|
|
35
|
+
| `dcgrep` | **Rust** | Code search: Ripgrep-powered ignore-aware search engine with optional trigram indexing (`tgrep-core`). |
|
|
36
|
+
|
|
37
|
+
### How hosts consume the modules
|
|
38
|
+
|
|
39
|
+
- **Manvi** wraps the components: it drives the agent loop, provider routing, policy ladder, and TUI, and reaches each binary over JSON on stdio. A host that wants a harness embeds Manvi rather than reimplementing it.
|
|
40
|
+
- **GitPulse** uses both for their respective jobs: Manvi (`manvi serve`) for policy, workbench, and agent hosting; selected DevCouncil crates and the `devmap` CLI for in-process code intelligence. It does not have to take every module.
|
|
41
|
+
- **Other apps** pick the same way — `devmap` alone, `dcverify` alone, the Go host MCP, or the full set. Updating one module does not require shipping the rest.
|
|
42
|
+
|
|
43
|
+
> [!NOTE]
|
|
44
|
+
> DevCouncil is built entirely as native compiled Go and Rust binaries; legacy Python orchestration has been retired (see [docs/PHASE7_LONG_TAIL.md](docs/PHASE7_LONG_TAIL.md)).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
14
49
|
|
|
15
|
-
|
|
16
|
-
- [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.
|
|
18
|
-
- [CLI command reference](docs/cli-reference.md): available `dev` commands.
|
|
19
|
-
- [Architecture](docs/architecture.md): components, artifact graph, state machine, and gated execution.
|
|
20
|
-
- [Live review](docs/live-review.md): `dev watch` session review, cards, signals, and blocking behavior.
|
|
21
|
-
- [Security model](docs/security.md): redaction, permissions, allowlists, and local state.
|
|
22
|
-
- [Project status](docs/project-status.md): current maturity by subsystem.
|
|
23
|
-
- [Roadmap](docs/roadmap.md): planned work.
|
|
50
|
+
DevCouncil supports macOS, Linux, and Windows. Requires a Go toolchain (`>=1.22`), Rust/`cargo`, and Git.
|
|
24
51
|
|
|
25
|
-
|
|
52
|
+
### 1. Build and Install Native Binaries
|
|
26
53
|
|
|
27
|
-
|
|
54
|
+
From a clone of this repository:
|
|
28
55
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
56
|
+
```bash
|
|
57
|
+
# macOS & Linux: builds Go host and all Rust analysis binaries into ~/.local/bin
|
|
58
|
+
bash scripts/install.sh
|
|
59
|
+
|
|
60
|
+
# Standalone DevMap (no Go host)
|
|
61
|
+
bash scripts/install.sh --only=devmap
|
|
33
62
|
|
|
34
|
-
|
|
63
|
+
# Analysis suite only (devmap dcstore dcverify dcgrep)
|
|
64
|
+
bash scripts/install.sh analysis
|
|
35
65
|
|
|
36
|
-
|
|
66
|
+
# Windows (PowerShell):
|
|
67
|
+
.\scripts\install.ps1
|
|
68
|
+
.\scripts\install.ps1 -Components devmap
|
|
69
|
+
```
|
|
37
70
|
|
|
38
|
-
|
|
71
|
+
To build and install the analysis components (`devmap`, `dcstore`, `dcverify`, `dcgrep`):
|
|
39
72
|
|
|
40
|
-
|
|
73
|
+
```bash
|
|
74
|
+
# Build & install all analysis components to ~/.local/bin
|
|
75
|
+
bash scripts/install-components.sh
|
|
41
76
|
|
|
42
|
-
|
|
77
|
+
# Or install specific components
|
|
78
|
+
bash scripts/install-components.sh devmap
|
|
79
|
+
bash scripts/install-components.sh dcstore dcverify dcgrep
|
|
43
80
|
|
|
44
|
-
|
|
45
|
-
|
|
81
|
+
# Build the Go host binary
|
|
82
|
+
go -C backend/go_orchestrator build -o ~/.local/bin/devcouncil ./cmd/devcouncil
|
|
83
|
+
ln -sf devcouncil ~/.local/bin/dev
|
|
46
84
|
```
|
|
47
85
|
|
|
48
|
-
|
|
86
|
+
Ensure `~/.local/bin` is in your `PATH`:
|
|
49
87
|
|
|
50
88
|
```bash
|
|
51
|
-
|
|
89
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
52
90
|
```
|
|
53
91
|
|
|
54
|
-
|
|
92
|
+
### 2. Optional Global npm Shim
|
|
93
|
+
|
|
94
|
+
If you prefer to dispatch through npm, install the lightweight Node.js wrapper (Node 18+). The npm package ships a shim that resolves and executes the native binaries:
|
|
55
95
|
|
|
56
96
|
```bash
|
|
57
97
|
npm install -g devcouncil
|
|
58
|
-
devcouncil --help
|
|
59
|
-
dev --help
|
|
60
98
|
```
|
|
61
99
|
|
|
62
|
-
|
|
100
|
+
### 3. Verify Environment
|
|
63
101
|
|
|
64
102
|
```bash
|
|
65
|
-
|
|
66
|
-
dev
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
dev verify TASK-001
|
|
103
|
+
devcouncil --help
|
|
104
|
+
dev --help
|
|
105
|
+
devmap --version
|
|
106
|
+
dcverify health
|
|
107
|
+
dcstore --db .devcouncil/state.sqlite health
|
|
108
|
+
dcgrep health
|
|
72
109
|
```
|
|
73
110
|
|
|
74
|
-
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Core Capabilities & Workflows
|
|
75
114
|
|
|
76
|
-
|
|
115
|
+
### 1. Coding Agent Integration (`devcouncil integrate`)
|
|
77
116
|
|
|
78
|
-
|
|
117
|
+
Connect DevCouncil's MCP server to Cursor or Claude Code. `--write-gate` has been removed: it named a pre-tool-use gate that only the retired lifecycle hooks installed, and nothing enforced it. Use `dev hook status` to inspect old registrations and `dev hook disable --dry-run` to preview cleanup.
|
|
79
118
|
|
|
80
119
|
```bash
|
|
81
|
-
|
|
82
|
-
|
|
120
|
+
devcouncil integrate cursor --apply
|
|
121
|
+
devcouncil integrate claude --apply
|
|
122
|
+
|
|
123
|
+
# Stub receipt only — not a working installer:
|
|
124
|
+
# devcouncil integrate antigravity --apply
|
|
125
|
+
|
|
126
|
+
# Verify existing integration configuration
|
|
127
|
+
devcouncil integrate cursor --check
|
|
83
128
|
```
|
|
84
129
|
|
|
85
|
-
|
|
130
|
+
### 2. Engineering Skills Delivery (`devcouncil skills`)
|
|
86
131
|
|
|
87
|
-
|
|
132
|
+
Deliver verified engineering practices and code-intelligence skills directly into agent skill folders (`.agents/skills`, `.claude/skills`, `.cursor/skills`):
|
|
88
133
|
|
|
89
134
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
```
|
|
135
|
+
# List available skills embedded in the binary
|
|
136
|
+
devcouncil skills list
|
|
93
137
|
|
|
94
|
-
|
|
138
|
+
# Scaffold all applicable skills into the repository
|
|
139
|
+
devcouncil skills scaffold
|
|
95
140
|
|
|
96
|
-
|
|
141
|
+
# Scaffold a specific skill (e.g. core-engineering or devmap)
|
|
142
|
+
devcouncil skills scaffold --skill core-engineering
|
|
143
|
+
devcouncil skills scaffold --skill devmap
|
|
144
|
+
```
|
|
97
145
|
|
|
98
|
-
|
|
146
|
+
### 3. Repository Mapping & Code Intelligence (`devmap` / `dev map`)
|
|
99
147
|
|
|
100
|
-
|
|
148
|
+
Build and query deep semantic relationships across your codebase without an LLM:
|
|
101
149
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
4. The agent edits the repository.
|
|
106
|
-
5. DevCouncil verifies the resulting diff against task constraints.
|
|
107
|
-
6. If verification fails, DevCouncil creates a focused repair loop.
|
|
150
|
+
```bash
|
|
151
|
+
# Build the repository map (.devcouncil/repo_map.json) and code graph
|
|
152
|
+
devmap build --manifest
|
|
108
153
|
|
|
109
|
-
|
|
154
|
+
# Shorthand via the Go host:
|
|
155
|
+
dev map
|
|
110
156
|
|
|
111
|
-
|
|
157
|
+
# Query symbol blast radius & reverse dependents before editing
|
|
158
|
+
devmap impact path/to/file.go
|
|
112
159
|
|
|
113
|
-
|
|
160
|
+
# Trace dependency paths between two symbols
|
|
161
|
+
devmap trace SymbolA SymbolB
|
|
114
162
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
163
|
+
# Find dead code with confidence tiers (extracted | inferred | ambiguous)
|
|
164
|
+
devmap dead
|
|
165
|
+
|
|
166
|
+
# Launch the interactive HTML visualizer
|
|
167
|
+
devmap view
|
|
118
168
|
```
|
|
119
169
|
|
|
120
|
-
|
|
170
|
+
### 4. Task Leases & Gated Verification (`devcouncil verify`)
|
|
171
|
+
|
|
172
|
+
Prevent multi-agent file trampling and verify diff correctness against deterministic criteria:
|
|
121
173
|
|
|
122
174
|
```bash
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
175
|
+
# Run deterministic verification against a task's diff
|
|
176
|
+
devcouncil verify TASK-001
|
|
177
|
+
|
|
178
|
+
# Machine-readable output for agent loops
|
|
179
|
+
devcouncil verify TASK-001 --json
|
|
180
|
+
|
|
181
|
+
# Sandbox flag is recorded only; docker/nix do not isolate (TASK-P7-2)
|
|
182
|
+
devcouncil verify TASK-001 --sandbox local
|
|
126
183
|
```
|
|
127
184
|
|
|
128
|
-
|
|
185
|
+
Verification today (Go `verify.Run()`) enforces:
|
|
186
|
+
- **Planned file scope:** Rejects unauthorized edits outside declared task boundaries.
|
|
187
|
+
- **Orphan diffs / dependency-risk:** Flags files changed that were not planned.
|
|
188
|
+
- **Expected tests / allowed commands:** Runs the task's command list via `/bin/sh -c` in the project root.
|
|
189
|
+
- **Typed `next_actions`:** Structured repair instructions when those gates fail.
|
|
129
190
|
|
|
130
|
-
|
|
191
|
+
Stub detection, secret scanning, and coverage intersection live in the **`dcverify`** binary. `devcouncil verify`, MCP `devcouncil_verify_task`, and **Manvi** `runRigor` all spawn it. When `dcverify` is not installed the report carries an empty `rigor_applied` **and** a `rigor_skipped_reason` naming what to install — never a silent clean pass. Diff↔coverage runs only when a profile is supplied (`devcouncil verify --coverage PATH`); otherwise `coverage_skipped_reason` says so.
|
|
131
192
|
|
|
132
|
-
|
|
133
|
-
2. Requirements drafting.
|
|
134
|
-
3. Council debate and task arbitration.
|
|
135
|
-
4. Gated execution with scoped files and commands.
|
|
136
|
-
5. Deterministic verification.
|
|
137
|
-
6. Repair-loop generation.
|
|
138
|
-
7. Evidence reporting.
|
|
193
|
+
### 5. MCP Servers for AI Agents
|
|
139
194
|
|
|
140
|
-
|
|
195
|
+
DevCouncil provides two complementary Model Context Protocol (MCP) servers:
|
|
141
196
|
|
|
142
|
-
|
|
197
|
+
- **Host MCP Server (`devcouncil mcp`)**: Eight tools — checkout / renew / release / next_task / get_diff / verify_task / get_gaps / policy_check_write. `verify_task` runs Go `verify.Run()`, which spawns `dcverify` for the stub and secret gates; diff↔coverage needs a profile this tool has no field for, so use `devcouncil verify --coverage PATH`.
|
|
198
|
+
- **DevMap MCP Server (`devmap mcp`)**: Eleven query tools (status, search, dependencies, impact, trace, neighbors, dead_symbols, clones, preview, explore, affected_tests). Always pass `repo_path`.
|
|
143
199
|
|
|
144
|
-
|
|
200
|
+
---
|
|
145
201
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
202
|
+
## Architecture Flow
|
|
203
|
+
|
|
204
|
+
```mermaid
|
|
205
|
+
flowchart TD
|
|
206
|
+
subgraph Agents["Harnesses, hosts, and coding agents"]
|
|
207
|
+
Claude["Claude Code"]
|
|
208
|
+
Cursor["Cursor"]
|
|
209
|
+
Codex["Codex"]
|
|
210
|
+
AGY["Antigravity"]
|
|
211
|
+
Warp["Warp"]
|
|
212
|
+
Manvi["Manvi (wraps these components)"]
|
|
213
|
+
GitPulse["GitPulse (selects modules)"]
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
subgraph Host["Go Host Orchestrator (devcouncil / dev)"]
|
|
217
|
+
CLI["Host CLI\ncmd/devcouncil"]
|
|
218
|
+
MCP["Host MCP Server\ndevcouncil mcp"]
|
|
219
|
+
Integ["Integrator\ndevcouncil integrate"]
|
|
220
|
+
Skills["Skills Engine\ndevcouncil skills"]
|
|
221
|
+
VerifyCmd["Verify Command\ndevcouncil verify"]
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
subgraph RustAnalysis["Rust Analysis & State Suite"]
|
|
225
|
+
DevMap["devmap\nCode Graph & 36+ Language ASTs"]
|
|
226
|
+
DCStore["dcstore\nAtomic Task Leases & SQLite Store"]
|
|
227
|
+
DCVerify["dcverify\nUnified Diff Parser & Rigor Gates"]
|
|
228
|
+
DCGrep["dcgrep\nRipgrep Engine & Trigram Index"]
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
Agents <-->|MCP Protocol| MCP
|
|
232
|
+
Agents <-->|Direct / Tool Calls| CLI
|
|
233
|
+
Manvi -->|Wraps: imports Go, spawns binaries| Host
|
|
234
|
+
Manvi -->|Spawns selected modules| RustAnalysis
|
|
235
|
+
GitPulse -->|Vendors selected crates| DevMap
|
|
236
|
+
GitPulse -->|manvi serve| Manvi
|
|
237
|
+
|
|
238
|
+
CLI -->|Execs| DevMap
|
|
239
|
+
CLI -->|Integrates| Integ
|
|
240
|
+
CLI -->|Scaffolds| Skills
|
|
241
|
+
VerifyCmd -->|Scope, orphan, expected tests| DCStore
|
|
242
|
+
Manvi -->|Spawns dcverify rigor| DCVerify
|
|
243
|
+
|
|
244
|
+
MCP -->|Leases and tasks| DCStore
|
|
245
|
+
MCP -->|verify_task → Go Run| VerifyCmd
|
|
246
|
+
```
|
|
155
247
|
|
|
156
|
-
|
|
248
|
+
---
|
|
157
249
|
|
|
158
|
-
|
|
250
|
+
## Repository Layout
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
DevCouncil/
|
|
254
|
+
├── backend/go_orchestrator/ # Go host orchestrator binary and packages
|
|
255
|
+
│ ├── cmd/devcouncil/ # Main entrypoint for devcouncil and dev
|
|
256
|
+
│ ├── devcouncil/ # MCP server, integrate, skills, verify implementations
|
|
257
|
+
│ ├── dc/store/ # Interop client for dcstore binary
|
|
258
|
+
│ └── policy/ # File-write containment & security policies
|
|
259
|
+
├── rust/ # Analysis and verification engine crates (dcstore, dcverify, dcgrep, devmap)
|
|
260
|
+
├── bin/ # Node.js npm shim (bin/devcouncil.js)
|
|
261
|
+
├── scripts/ # Platform installers (install.sh, install-components.sh)
|
|
262
|
+
└── docs/ # Architecture, releases, and integration guides
|
|
263
|
+
```
|
|
159
264
|
|
|
160
265
|
---
|
|
161
266
|
|
|
162
|
-
|
|
267
|
+
## Documentation
|
|
268
|
+
|
|
269
|
+
- [Release Notes (v0.2.0)](docs/releases/v0.2.0.md): Native orchestration and analysis migration.
|
|
270
|
+
- [Native cutover follow-ups](docs/TODO.md): Open wiring and honesty work after Phase 7.
|
|
271
|
+
- [Architecture Decisions & Python Retirement](docs/PHASE7_LONG_TAIL.md): Background on the transition to native Go and Rust binaries.
|
|
272
|
+
- [Archived ledgers](docs/archive/README.md): Pre-cutover DevMap plans, audits, and qualification dumps.
|
|
273
|
+
- [Code Graph & DevMap Guide](docs/code-graph.md): Symbol resolution, dead code, and blast radius.
|
|
274
|
+
- [DevMap competitor benchmarks](docs/devmap/README.md#benchmark-comparison): Measured strengths, weaknesses, speed, memory, storage, and correctness against Graphify, Gortex, GitNexus, CodeGraph, codebase-memory-mcp, and ripgrep, with scope limits and raw evidence.
|
|
275
|
+
- [Hero Loop (MCP Closed Loop)](docs/hero-loop.md): Autonomous task loop with deterministic gates.
|
|
276
|
+
- [Coding CLI Integration](docs/coding-cli-integration.md): Configuring Claude, Codex, Cursor, Warp, and Antigravity.
|
|
277
|
+
- [Security Model](docs/security.md): Redaction, write isolation, and containment rules.
|
|
278
|
+
- [Project Status](docs/project-status.md): Subsystem maturity ledger.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## License
|
|
283
|
+
|
|
284
|
+
Licensed under the **Apache License, Version 2.0**. See [LICENSE](LICENSE) for details.
|
package/bin/devcouncil.js
CHANGED
|
@@ -1,18 +1,129 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* npm `dev` / `devcouncil` shim.
|
|
5
|
+
*
|
|
6
|
+
* Live commands belong to the Go `devcouncil` binary, including `map` /
|
|
7
|
+
* `graph` / `ast` (which that binary execs `devmap` for). This file never
|
|
8
|
+
* invokes Python or uv, and it is not a second owner of any command.
|
|
9
|
+
*/
|
|
10
|
+
|
|
3
11
|
const { spawnSync } = require("node:child_process");
|
|
4
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
closeSync,
|
|
14
|
+
existsSync,
|
|
15
|
+
openSync,
|
|
16
|
+
readSync,
|
|
17
|
+
realpathSync,
|
|
18
|
+
statSync,
|
|
19
|
+
} = require("node:fs");
|
|
5
20
|
const path = require("node:path");
|
|
6
21
|
|
|
7
|
-
const
|
|
8
|
-
|
|
22
|
+
const WIN32 = process.platform === "win32";
|
|
23
|
+
|
|
24
|
+
function localBinDir() {
|
|
25
|
+
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
26
|
+
return home ? path.join(home, ".local", "bin") : "";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function isSelf(file) {
|
|
30
|
+
try {
|
|
31
|
+
return realpathSync(file) === realpathSync(__filename);
|
|
32
|
+
} catch {
|
|
33
|
+
return path.resolve(file) === path.resolve(__filename);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function looksLikeNodeShim(file) {
|
|
38
|
+
const lower = file.toLowerCase();
|
|
39
|
+
if (
|
|
40
|
+
lower.endsWith(".js") ||
|
|
41
|
+
lower.endsWith(".cmd") ||
|
|
42
|
+
lower.endsWith(".bat") ||
|
|
43
|
+
lower.endsWith(".ps1")
|
|
44
|
+
) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
let fd;
|
|
48
|
+
try {
|
|
49
|
+
fd = openSync(file, "r");
|
|
50
|
+
const buf = Buffer.alloc(160);
|
|
51
|
+
const n = readSync(fd, buf, 0, 160, 0);
|
|
52
|
+
const line = buf.slice(0, n).toString("utf8").split(/\r?\n/, 1)[0] || "";
|
|
53
|
+
if (line.startsWith("#!") && /\bnode\b/i.test(line)) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
} catch {
|
|
57
|
+
return false;
|
|
58
|
+
} finally {
|
|
59
|
+
if (fd !== undefined) {
|
|
60
|
+
closeSync(fd);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function isNativeBin(file) {
|
|
67
|
+
if (!file || !existsSync(file)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
if (statSync(file).isDirectory()) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
if (isSelf(file) || looksLikeNodeShim(file)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function resolveBin(name, envKey) {
|
|
84
|
+
const override = process.env[envKey];
|
|
85
|
+
if (override) {
|
|
86
|
+
return override;
|
|
87
|
+
}
|
|
88
|
+
const dirs = (process.env.PATH || "").split(path.delimiter).filter(Boolean);
|
|
89
|
+
const local = localBinDir();
|
|
90
|
+
if (local) {
|
|
91
|
+
dirs.push(local);
|
|
92
|
+
}
|
|
93
|
+
const exts = WIN32 ? [".exe", ".com", ""] : [""];
|
|
94
|
+
for (const dir of dirs) {
|
|
95
|
+
for (const ext of exts) {
|
|
96
|
+
const candidate = path.join(dir, name + ext);
|
|
97
|
+
if (isNativeBin(candidate)) {
|
|
98
|
+
return candidate;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function spawnEnv() {
|
|
106
|
+
const env = { ...process.env };
|
|
107
|
+
const local = localBinDir();
|
|
108
|
+
if (local && existsSync(local)) {
|
|
109
|
+
const current = env.PATH || env.Path || "";
|
|
110
|
+
const parts = current.split(path.delimiter);
|
|
111
|
+
if (!parts.includes(local)) {
|
|
112
|
+
env.PATH = `${local}${path.delimiter}${current}`;
|
|
113
|
+
if (WIN32) {
|
|
114
|
+
env.Path = env.PATH;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return env;
|
|
119
|
+
}
|
|
9
120
|
|
|
10
121
|
function run(command, args) {
|
|
11
122
|
return spawnSync(command, args, {
|
|
12
123
|
cwd: process.cwd(),
|
|
13
124
|
stdio: "inherit",
|
|
14
|
-
shell:
|
|
15
|
-
env:
|
|
125
|
+
shell: false,
|
|
126
|
+
env: spawnEnv(),
|
|
16
127
|
});
|
|
17
128
|
}
|
|
18
129
|
|
|
@@ -21,42 +132,29 @@ function fail(message) {
|
|
|
21
132
|
process.exit(1);
|
|
22
133
|
}
|
|
23
134
|
|
|
24
|
-
function
|
|
25
|
-
const check = spawnSync("uv", ["--version"], {
|
|
26
|
-
stdio: "ignore",
|
|
27
|
-
shell: process.platform === "win32",
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
if (check.status === 0) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
135
|
+
function missing(name, hint) {
|
|
34
136
|
fail(
|
|
35
137
|
[
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
" macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh",
|
|
39
|
-
' Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"',
|
|
40
|
-
"",
|
|
41
|
-
"Then rerun:",
|
|
42
|
-
" devcouncil --help",
|
|
138
|
+
`DevCouncil requires the ${name} binary on PATH (or ~/.local/bin).`,
|
|
139
|
+
hint,
|
|
43
140
|
].join("\n")
|
|
44
141
|
);
|
|
45
142
|
}
|
|
46
143
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
144
|
+
const args = process.argv.slice(2);
|
|
145
|
+
|
|
146
|
+
const goBin = resolveBin("devcouncil", "DEVCOUNCIL_BIN");
|
|
147
|
+
if (!goBin) {
|
|
148
|
+
missing(
|
|
149
|
+
"devcouncil",
|
|
150
|
+
WIN32
|
|
151
|
+
? "Build: go -C backend/go_orchestrator build -o %USERPROFILE%\\.local\\bin\\devcouncil.exe ./cmd/devcouncil\nAlso copy it to %USERPROFILE%\\.local\\bin\\dev.exe (scripts/install.ps1)."
|
|
152
|
+
: "Build: go -C backend/go_orchestrator build -o ~/.local/bin/devcouncil ./cmd/devcouncil\nAlso: ln -sf devcouncil ~/.local/bin/dev"
|
|
50
153
|
);
|
|
51
154
|
}
|
|
52
155
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const args = process.argv.slice(2);
|
|
56
|
-
const result = run("uv", ["run", "--project", packageRoot, "devcouncil", ...args]);
|
|
57
|
-
|
|
156
|
+
const result = run(goBin, args);
|
|
58
157
|
if (result.error) {
|
|
59
|
-
fail(`Failed to start
|
|
158
|
+
fail(`Failed to start devcouncil: ${result.error.message}`);
|
|
60
159
|
}
|
|
61
|
-
|
|
62
160
|
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devcouncil",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
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",
|
|
@@ -25,21 +25,17 @@
|
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"bin/",
|
|
28
|
-
"src/**/*.py",
|
|
29
|
-
"src/**/*.md",
|
|
30
|
-
"pyproject.toml",
|
|
31
|
-
"uv.lock",
|
|
32
28
|
"README.md",
|
|
33
29
|
"LICENSE"
|
|
34
30
|
],
|
|
35
31
|
"scripts": {
|
|
36
|
-
"install:dev": "uv tool install --force .",
|
|
37
|
-
"install:editable": "uv pip install -e .",
|
|
38
|
-
"dev": "uv run devcouncil",
|
|
39
32
|
"pack:check": "npm pack --dry-run",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"check": "
|
|
33
|
+
"smoke:package": "node scripts/npm-runtime-smoke.mjs",
|
|
34
|
+
"smoke:registry": "node scripts/npm-registry-smoke.mjs",
|
|
35
|
+
"check:release": "node scripts/check-release.mjs",
|
|
36
|
+
"check:workflows": "node scripts/check-workflows.mjs",
|
|
37
|
+
"test:scripts": "node --test scripts/check-release.test.mjs scripts/check-workflows.test.mjs",
|
|
38
|
+
"ci:local": "node scripts/ci-local.mjs"
|
|
43
39
|
},
|
|
44
40
|
"engines": {
|
|
45
41
|
"node": ">=18"
|
package/pyproject.toml
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "devcouncil"
|
|
3
|
-
version = "0.1.1"
|
|
4
|
-
description = "Gated orchestrator for AI-assisted software development"
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.12"
|
|
7
|
-
dependencies = [
|
|
8
|
-
"typer>=0.12.3",
|
|
9
|
-
"rich>=13.7.1",
|
|
10
|
-
"pydantic>=2.7.1",
|
|
11
|
-
"pyyaml>=6.0.1",
|
|
12
|
-
"sqlmodel>=0.0.19",
|
|
13
|
-
"httpx>=0.27.0",
|
|
14
|
-
"gitpython>=3.1.43",
|
|
15
|
-
"mcp>=1.27.0",
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
[project.scripts]
|
|
19
|
-
dev = "devcouncil.cli.main:app"
|
|
20
|
-
devcouncil = "devcouncil.cli.main:app"
|
|
21
|
-
|
|
22
|
-
[dependency-groups]
|
|
23
|
-
dev = [
|
|
24
|
-
"pytest>=8.2.0",
|
|
25
|
-
"ruff>=0.4.4",
|
|
26
|
-
"mypy>=1.10.0",
|
|
27
|
-
]
|
|
28
|
-
|
|
29
|
-
[tool.pytest.ini_options]
|
|
30
|
-
testpaths = ["tests"]
|
|
31
|
-
|
|
32
|
-
[build-system]
|
|
33
|
-
requires = ["hatchling"]
|
|
34
|
-
build-backend = "hatchling.build"
|
|
File without changes
|