devcouncil 0.2.0 → 0.2.2
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 +144 -308
- package/bin/devcouncil.js +130 -32
- package/package.json +22 -19
- package/pyproject.toml +0 -66
- 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 -320
- 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 -163
- 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/assets/__init__.py +0 -1
- package/src/devcouncil/assets/devcouncil-logo.svg +0 -60
- package/src/devcouncil/assets/devcouncil_logo_premium.png +0 -0
- package/src/devcouncil/cli/__init__.py +0 -0
- package/src/devcouncil/cli/commands/__init__.py +0 -0
- package/src/devcouncil/cli/commands/agents.py +0 -292
- package/src/devcouncil/cli/commands/artifacts.py +0 -54
- package/src/devcouncil/cli/commands/ast.py +0 -22
- package/src/devcouncil/cli/commands/baseline.py +0 -35
- package/src/devcouncil/cli/commands/check.py +0 -209
- package/src/devcouncil/cli/commands/config.py +0 -115
- package/src/devcouncil/cli/commands/cost.py +0 -57
- package/src/devcouncil/cli/commands/dashboard.py +0 -31
- package/src/devcouncil/cli/commands/doctor.py +0 -340
- package/src/devcouncil/cli/commands/evidence.py +0 -48
- package/src/devcouncil/cli/commands/go.py +0 -656
- package/src/devcouncil/cli/commands/handoff.py +0 -69
- package/src/devcouncil/cli/commands/hook.py +0 -237
- package/src/devcouncil/cli/commands/init.py +0 -289
- package/src/devcouncil/cli/commands/integrate.py +0 -1515
- package/src/devcouncil/cli/commands/lsp.py +0 -20
- package/src/devcouncil/cli/commands/map.py +0 -112
- package/src/devcouncil/cli/commands/mcp_server.py +0 -18
- package/src/devcouncil/cli/commands/plan.py +0 -488
- package/src/devcouncil/cli/commands/prompt.py +0 -61
- package/src/devcouncil/cli/commands/repair.py +0 -89
- package/src/devcouncil/cli/commands/report.py +0 -137
- package/src/devcouncil/cli/commands/reset_demo_state.py +0 -33
- package/src/devcouncil/cli/commands/rollback.py +0 -59
- package/src/devcouncil/cli/commands/run.py +0 -289
- package/src/devcouncil/cli/commands/runs.py +0 -223
- package/src/devcouncil/cli/commands/scaffold.py +0 -32
- package/src/devcouncil/cli/commands/semantic.py +0 -47
- package/src/devcouncil/cli/commands/setup.py +0 -362
- package/src/devcouncil/cli/commands/shell.py +0 -73
- package/src/devcouncil/cli/commands/show.py +0 -76
- package/src/devcouncil/cli/commands/skills.py +0 -88
- package/src/devcouncil/cli/commands/status.py +0 -141
- package/src/devcouncil/cli/commands/tasks.py +0 -55
- package/src/devcouncil/cli/commands/trace.py +0 -88
- package/src/devcouncil/cli/commands/verify.py +0 -328
- package/src/devcouncil/cli/commands/version.py +0 -20
- package/src/devcouncil/cli/commands/watch.py +0 -574
- package/src/devcouncil/cli/commands/watch_fs.py +0 -40
- package/src/devcouncil/cli/main.py +0 -137
- 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 -47
- package/src/devcouncil/domain/gap.py +0 -52
- package/src/devcouncil/domain/requirement.py +0 -22
- package/src/devcouncil/domain/task.py +0 -55
- package/src/devcouncil/execution/__init__.py +0 -1
- package/src/devcouncil/execution/checkpoints.py +0 -246
- package/src/devcouncil/execution/context_builder.py +0 -60
- package/src/devcouncil/execution/executor.py +0 -15
- package/src/devcouncil/execution/fs_watcher.py +0 -180
- package/src/devcouncil/execution/handoff.py +0 -102
- package/src/devcouncil/execution/hook_policy.py +0 -253
- package/src/devcouncil/execution/patch.py +0 -77
- package/src/devcouncil/execution/paths.py +0 -14
- package/src/devcouncil/execution/permissions.py +0 -85
- package/src/devcouncil/execution/policy_engine.py +0 -343
- package/src/devcouncil/execution/prompt_builder.py +0 -671
- package/src/devcouncil/execution/shell_session.py +0 -225
- package/src/devcouncil/execution/task_runner.py +0 -170
- package/src/devcouncil/executors/__init__.py +0 -1
- package/src/devcouncil/executors/agent_registry.py +0 -575
- package/src/devcouncil/executors/coding_cli.py +0 -736
- 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 -208
- 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 -52
- 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 -53
- package/src/devcouncil/gating/policy.py +0 -338
- package/src/devcouncil/hardware.py +0 -184
- 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 -161
- package/src/devcouncil/indexing/repo_mapper.py +0 -1455
- package/src/devcouncil/indexing/semantic_index.py +0 -205
- package/src/devcouncil/integrations/actions.py +0 -146
- package/src/devcouncil/integrations/check.py +0 -423
- package/src/devcouncil/integrations/code_review_graph.py +0 -163
- package/src/devcouncil/integrations/github.py +0 -39
- package/src/devcouncil/integrations/github_intent.py +0 -142
- package/src/devcouncil/integrations/gitnexus.py +0 -62
- 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 -2122
- package/src/devcouncil/integrations/opencode_devcouncil_plugin.mjs +0 -24
- package/src/devcouncil/integrations/pr_comments.py +0 -62
- package/src/devcouncil/live/__init__.py +0 -2
- package/src/devcouncil/live/cards.py +0 -349
- 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 -141
- package/src/devcouncil/llm/__init__.py +0 -1
- package/src/devcouncil/llm/cache.py +0 -42
- package/src/devcouncil/llm/model_defaults.yaml +0 -44
- package/src/devcouncil/llm/provider.py +0 -627
- package/src/devcouncil/llm/router.py +0 -310
- package/src/devcouncil/optimization/__init__.py +0 -1
- package/src/devcouncil/optimization/gepa_agent.py +0 -318
- package/src/devcouncil/planning/__init__.py +0 -1
- package/src/devcouncil/planning/arbiter_service.py +0 -57
- package/src/devcouncil/planning/correction_manifest.py +0 -303
- package/src/devcouncil/planning/critique_service.py +0 -71
- package/src/devcouncil/planning/plan_service.py +0 -60
- package/src/devcouncil/planning/prompt_enhancer_service.py +0 -167
- package/src/devcouncil/planning/repair_service.py +0 -39
- package/src/devcouncil/planning/spec_service.py +0 -70
- package/src/devcouncil/repo/__init__.py +0 -0
- package/src/devcouncil/repo/ci_scaffold.py +0 -157
- package/src/devcouncil/repo/gitignore.py +0 -123
- package/src/devcouncil/repo/sca.py +0 -374
- 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 -30
- package/src/devcouncil/reporting/markdown_report.py +0 -83
- package/src/devcouncil/reporting/report_builder.py +0 -14
- package/src/devcouncil/skills/__init__.py +0 -19
- package/src/devcouncil/skills/library/README.md +0 -46
- package/src/devcouncil/skills/library/ai-training.md +0 -50
- package/src/devcouncil/skills/library/android.md +0 -50
- package/src/devcouncil/skills/library/backend.md +0 -52
- package/src/devcouncil/skills/library/core-engineering.md +0 -95
- package/src/devcouncil/skills/library/data-engineering.md +0 -47
- package/src/devcouncil/skills/library/desktop.md +0 -46
- package/src/devcouncil/skills/library/devops.md +0 -48
- package/src/devcouncil/skills/library/game-dev.md +0 -46
- package/src/devcouncil/skills/library/ios.md +0 -48
- package/src/devcouncil/skills/library/mobile-cross-platform.md +0 -46
- package/src/devcouncil/skills/library/security.md +0 -48
- package/src/devcouncil/skills/library/systems.md +0 -48
- package/src/devcouncil/skills/library/web.md +0 -47
- package/src/devcouncil/skills/library/windows.md +0 -47
- package/src/devcouncil/skills/registry.py +0 -330
- package/src/devcouncil/storage/__init__.py +0 -0
- package/src/devcouncil/storage/db.py +0 -147
- package/src/devcouncil/storage/models.py +0 -204
- package/src/devcouncil/storage/native.py +0 -557
- package/src/devcouncil/storage/repositories.py +0 -485
- package/src/devcouncil/telemetry/__init__.py +0 -0
- package/src/devcouncil/telemetry/cost.py +0 -140
- package/src/devcouncil/telemetry/model_pricing.yaml +0 -48
- package/src/devcouncil/telemetry/pricing.py +0 -28
- package/src/devcouncil/telemetry/traces.py +0 -146
- package/src/devcouncil/telemetry/tracker.py +0 -52
- package/src/devcouncil/ui/__init__.py +0 -1
- package/src/devcouncil/ui/dashboard.py +0 -423
- package/src/devcouncil/utils/__init__.py +0 -1
- package/src/devcouncil/utils/redaction.py +0 -147
- package/src/devcouncil/utils/subprocess_env.py +0 -69
- package/src/devcouncil/verification/__init__.py +0 -1
- package/src/devcouncil/verification/acceptance_compiler.py +0 -125
- package/src/devcouncil/verification/ad_hoc_check.py +0 -129
- package/src/devcouncil/verification/diff_coverage.py +0 -353
- package/src/devcouncil/verification/implementation_reviewer.py +0 -55
- package/src/devcouncil/verification/next_actions.py +0 -189
- package/src/devcouncil/verification/sandbox.py +0 -178
- package/src/devcouncil/verification/test_resolver.py +0 -91
- package/src/devcouncil/verification/verifier.py +0 -1548
- package/uv.lock +0 -1226
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from typing import List, Dict, Any, Set
|
|
2
|
-
from pydantic import BaseModel, Field
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
|
|
5
|
-
class GraphNode(BaseModel):
|
|
6
|
-
id: str
|
|
7
|
-
type: str # "file", "symbol", "requirement", "task"
|
|
8
|
-
metadata: Dict[str, Any] = Field(default_factory=dict)
|
|
9
|
-
|
|
10
|
-
class GraphEdge(BaseModel):
|
|
11
|
-
source: str
|
|
12
|
-
target: str
|
|
13
|
-
relation: str # "imports", "implements", "validates", "contains"
|
|
14
|
-
|
|
15
|
-
class KnowledgeGraph(BaseModel):
|
|
16
|
-
nodes: List[GraphNode] = []
|
|
17
|
-
edges: List[GraphEdge] = []
|
|
18
|
-
|
|
19
|
-
class GraphIndex:
|
|
20
|
-
def __init__(self, project_root: Path):
|
|
21
|
-
self.project_root = project_root
|
|
22
|
-
self.graph = KnowledgeGraph()
|
|
23
|
-
|
|
24
|
-
def build_initial_graph(self, files: List[str]):
|
|
25
|
-
"""
|
|
26
|
-
Bootstrap the graph from file list.
|
|
27
|
-
"""
|
|
28
|
-
for f in files:
|
|
29
|
-
self.graph.nodes.append(GraphNode(
|
|
30
|
-
id=f,
|
|
31
|
-
type="file",
|
|
32
|
-
metadata={"extension": Path(f).suffix}
|
|
33
|
-
))
|
|
34
|
-
|
|
35
|
-
def add_relation(self, source: str, target: str, relation: str):
|
|
36
|
-
self.graph.edges.append(GraphEdge(source=source, target=target, relation=relation))
|
|
37
|
-
|
|
38
|
-
def get_context_for_file(self, file_path: str) -> Set[str]:
|
|
39
|
-
"""
|
|
40
|
-
Retrieve related paths for a given file.
|
|
41
|
-
"""
|
|
42
|
-
related = {file_path}
|
|
43
|
-
for edge in self.graph.edges:
|
|
44
|
-
if edge.source == file_path:
|
|
45
|
-
related.add(edge.target)
|
|
46
|
-
if edge.target == file_path:
|
|
47
|
-
related.add(edge.source)
|
|
48
|
-
return related
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import json
|
|
4
|
-
import shutil
|
|
5
|
-
from dataclasses import dataclass
|
|
6
|
-
from pathlib import Path
|
|
7
|
-
from typing import Any
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@dataclass(frozen=True)
|
|
11
|
-
class LspServerCandidate:
|
|
12
|
-
language: str
|
|
13
|
-
command: list[str]
|
|
14
|
-
available: bool
|
|
15
|
-
reason: str
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class LspInspector:
|
|
19
|
-
"""Language-server *detection* only — DevCouncil does not run an LSP client.
|
|
20
|
-
|
|
21
|
-
This inspector exists to answer one honest question: which language servers
|
|
22
|
-
for the repo's languages are installed on PATH? It does NOT spawn a server,
|
|
23
|
-
does NOT speak the LSP wire protocol, and does NOT send the ``initialize``
|
|
24
|
-
handshake. ``starter_initialize_payload`` builds the JSON-RPC ``initialize``
|
|
25
|
-
request a *future* client would send, but it is never transmitted — it is
|
|
26
|
-
surfaced purely as a reference/starter payload, clearly labelled as such, so
|
|
27
|
-
no consumer mistakes detection for a live LSP capability.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
_LANGUAGE_SERVERS: dict[str, list[list[str]]] = {
|
|
31
|
-
"python": [["pyright-langserver", "--stdio"], ["pylsp"]],
|
|
32
|
-
"typescript": [["typescript-language-server", "--stdio"]],
|
|
33
|
-
"javascript": [["typescript-language-server", "--stdio"]],
|
|
34
|
-
"go": [["gopls"]],
|
|
35
|
-
"rust": [["rust-analyzer"]],
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
_EXTENSIONS: dict[str, str] = {
|
|
39
|
-
".py": "python",
|
|
40
|
-
".ts": "typescript",
|
|
41
|
-
".tsx": "typescript",
|
|
42
|
-
".js": "javascript",
|
|
43
|
-
".jsx": "javascript",
|
|
44
|
-
".go": "go",
|
|
45
|
-
".rs": "rust",
|
|
46
|
-
}
|
|
47
|
-
_IGNORED_DIRS = {".git", ".devcouncil", "__pycache__", ".venv", "node_modules", "dist", "build", "target", "vendor"}
|
|
48
|
-
|
|
49
|
-
def __init__(self, project_root: Path):
|
|
50
|
-
self.project_root = project_root
|
|
51
|
-
|
|
52
|
-
def _is_ignored_path(self, file: str) -> bool:
|
|
53
|
-
return any(part in self._IGNORED_DIRS for part in Path(file).parts)
|
|
54
|
-
|
|
55
|
-
def detect_languages(self, files: list[str] | None = None) -> list[str]:
|
|
56
|
-
if files is None:
|
|
57
|
-
try:
|
|
58
|
-
discovered: list[str] = []
|
|
59
|
-
for path in self.project_root.rglob("*"):
|
|
60
|
-
if path.is_file() and not any(part in self._IGNORED_DIRS for part in path.parts):
|
|
61
|
-
discovered.append(str(path.relative_to(self.project_root)))
|
|
62
|
-
files = discovered
|
|
63
|
-
except OSError:
|
|
64
|
-
files = []
|
|
65
|
-
languages = {
|
|
66
|
-
self._EXTENSIONS[Path(file).suffix.lower()]
|
|
67
|
-
for file in files
|
|
68
|
-
if Path(file).suffix.lower() in self._EXTENSIONS and not self._is_ignored_path(file)
|
|
69
|
-
}
|
|
70
|
-
return sorted(languages)
|
|
71
|
-
|
|
72
|
-
def server_candidates(self, files: list[str] | None = None) -> list[LspServerCandidate]:
|
|
73
|
-
candidates: list[LspServerCandidate] = []
|
|
74
|
-
for language in self.detect_languages(files):
|
|
75
|
-
for command in self._LANGUAGE_SERVERS.get(language, []):
|
|
76
|
-
executable = command[0]
|
|
77
|
-
available = shutil.which(executable) is not None
|
|
78
|
-
candidates.append(
|
|
79
|
-
LspServerCandidate(
|
|
80
|
-
language=language,
|
|
81
|
-
command=command,
|
|
82
|
-
available=available,
|
|
83
|
-
reason="found on PATH" if available else "not found on PATH",
|
|
84
|
-
)
|
|
85
|
-
)
|
|
86
|
-
return candidates
|
|
87
|
-
|
|
88
|
-
def starter_initialize_payload(self, language: str) -> dict[str, Any]:
|
|
89
|
-
"""Build the JSON-RPC ``initialize`` request a future LSP client *would* send.
|
|
90
|
-
|
|
91
|
-
This payload is NEVER sent — DevCouncil has no LSP client. It is provided
|
|
92
|
-
only as a reference/starter for anyone wiring up real LSP support. See the
|
|
93
|
-
``initialize_requests`` block in :meth:`summary`, which carries the same
|
|
94
|
-
non-sent payloads under an explicit ``"_note"`` disclaimer.
|
|
95
|
-
"""
|
|
96
|
-
return {
|
|
97
|
-
"jsonrpc": "2.0",
|
|
98
|
-
"id": 1,
|
|
99
|
-
"method": "initialize",
|
|
100
|
-
"params": {
|
|
101
|
-
"processId": None,
|
|
102
|
-
"rootUri": self.project_root.resolve().as_uri(),
|
|
103
|
-
"capabilities": {
|
|
104
|
-
"textDocument": {
|
|
105
|
-
"publishDiagnostics": {"relatedInformation": True},
|
|
106
|
-
"definition": {"linkSupport": True},
|
|
107
|
-
"references": {},
|
|
108
|
-
"documentSymbol": {"hierarchicalDocumentSymbolSupport": True},
|
|
109
|
-
},
|
|
110
|
-
"workspace": {"symbol": {}},
|
|
111
|
-
},
|
|
112
|
-
"initializationOptions": {"language": language},
|
|
113
|
-
},
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
# Made explicit in every summary so no consumer reads this as a live LSP feature.
|
|
117
|
-
_DETECTION_ONLY_NOTE = (
|
|
118
|
-
"Detection only: DevCouncil checks which language servers are installed on "
|
|
119
|
-
"PATH; it does not run an LSP client or send any requests."
|
|
120
|
-
)
|
|
121
|
-
_STARTER_PAYLOAD_NOTE = (
|
|
122
|
-
"Starter payloads only — these initialize requests are NEVER sent. They are "
|
|
123
|
-
"a reference for wiring up a real LSP client later."
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
def summary(self, files: list[str] | None = None) -> dict[str, Any]:
|
|
127
|
-
candidates = self.server_candidates(files)
|
|
128
|
-
return {
|
|
129
|
-
"mode": "detection-only",
|
|
130
|
-
"note": self._DETECTION_ONLY_NOTE,
|
|
131
|
-
"languages": self.detect_languages(files),
|
|
132
|
-
"detected_servers": [
|
|
133
|
-
{
|
|
134
|
-
"language": candidate.language,
|
|
135
|
-
"command": candidate.command,
|
|
136
|
-
"available": candidate.available,
|
|
137
|
-
"reason": candidate.reason,
|
|
138
|
-
}
|
|
139
|
-
for candidate in candidates
|
|
140
|
-
],
|
|
141
|
-
# Back-compat alias for "detected_servers" (older consumers/tests).
|
|
142
|
-
"servers": [
|
|
143
|
-
{
|
|
144
|
-
"language": candidate.language,
|
|
145
|
-
"command": candidate.command,
|
|
146
|
-
"available": candidate.available,
|
|
147
|
-
"reason": candidate.reason,
|
|
148
|
-
}
|
|
149
|
-
for candidate in candidates
|
|
150
|
-
],
|
|
151
|
-
"initialize_requests": {
|
|
152
|
-
"_note": self._STARTER_PAYLOAD_NOTE,
|
|
153
|
-
**{
|
|
154
|
-
language: self.starter_initialize_payload(language)
|
|
155
|
-
for language in sorted({candidate.language for candidate in candidates})
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
def summary_json(self, files: list[str] | None = None) -> str:
|
|
161
|
-
return json.dumps(self.summary(files), indent=2)
|