devcouncil 0.2.0 → 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.
Files changed (205) hide show
  1. package/README.md +191 -253
  2. package/bin/devcouncil.js +130 -32
  3. package/package.json +6 -17
  4. package/pyproject.toml +0 -66
  5. package/src/devcouncil/__init__.py +0 -0
  6. package/src/devcouncil/__main__.py +0 -4
  7. package/src/devcouncil/app/__init__.py +0 -28
  8. package/src/devcouncil/app/config.py +0 -320
  9. package/src/devcouncil/app/errors.py +0 -23
  10. package/src/devcouncil/app/events.py +0 -44
  11. package/src/devcouncil/app/orchestrator.py +0 -92
  12. package/src/devcouncil/app/project_status.py +0 -29
  13. package/src/devcouncil/app/run_context.py +0 -39
  14. package/src/devcouncil/app/state_machine.py +0 -108
  15. package/src/devcouncil/artifacts/__init__.py +0 -1
  16. package/src/devcouncil/artifacts/coverage.py +0 -96
  17. package/src/devcouncil/artifacts/graph.py +0 -163
  18. package/src/devcouncil/artifacts/migrations.py +0 -20
  19. package/src/devcouncil/artifacts/schemas.py +0 -23
  20. package/src/devcouncil/artifacts/serializer.py +0 -21
  21. package/src/devcouncil/artifacts/validators.py +0 -27
  22. package/src/devcouncil/assets/__init__.py +0 -1
  23. package/src/devcouncil/assets/devcouncil-logo.svg +0 -60
  24. package/src/devcouncil/assets/devcouncil_logo_premium.png +0 -0
  25. package/src/devcouncil/cli/__init__.py +0 -0
  26. package/src/devcouncil/cli/commands/__init__.py +0 -0
  27. package/src/devcouncil/cli/commands/agents.py +0 -292
  28. package/src/devcouncil/cli/commands/artifacts.py +0 -54
  29. package/src/devcouncil/cli/commands/ast.py +0 -22
  30. package/src/devcouncil/cli/commands/baseline.py +0 -35
  31. package/src/devcouncil/cli/commands/check.py +0 -209
  32. package/src/devcouncil/cli/commands/config.py +0 -115
  33. package/src/devcouncil/cli/commands/cost.py +0 -57
  34. package/src/devcouncil/cli/commands/dashboard.py +0 -31
  35. package/src/devcouncil/cli/commands/doctor.py +0 -340
  36. package/src/devcouncil/cli/commands/evidence.py +0 -48
  37. package/src/devcouncil/cli/commands/go.py +0 -656
  38. package/src/devcouncil/cli/commands/handoff.py +0 -69
  39. package/src/devcouncil/cli/commands/hook.py +0 -237
  40. package/src/devcouncil/cli/commands/init.py +0 -289
  41. package/src/devcouncil/cli/commands/integrate.py +0 -1515
  42. package/src/devcouncil/cli/commands/lsp.py +0 -20
  43. package/src/devcouncil/cli/commands/map.py +0 -112
  44. package/src/devcouncil/cli/commands/mcp_server.py +0 -18
  45. package/src/devcouncil/cli/commands/plan.py +0 -488
  46. package/src/devcouncil/cli/commands/prompt.py +0 -61
  47. package/src/devcouncil/cli/commands/repair.py +0 -89
  48. package/src/devcouncil/cli/commands/report.py +0 -137
  49. package/src/devcouncil/cli/commands/reset_demo_state.py +0 -33
  50. package/src/devcouncil/cli/commands/rollback.py +0 -59
  51. package/src/devcouncil/cli/commands/run.py +0 -289
  52. package/src/devcouncil/cli/commands/runs.py +0 -223
  53. package/src/devcouncil/cli/commands/scaffold.py +0 -32
  54. package/src/devcouncil/cli/commands/semantic.py +0 -47
  55. package/src/devcouncil/cli/commands/setup.py +0 -362
  56. package/src/devcouncil/cli/commands/shell.py +0 -73
  57. package/src/devcouncil/cli/commands/show.py +0 -76
  58. package/src/devcouncil/cli/commands/skills.py +0 -88
  59. package/src/devcouncil/cli/commands/status.py +0 -141
  60. package/src/devcouncil/cli/commands/tasks.py +0 -55
  61. package/src/devcouncil/cli/commands/trace.py +0 -88
  62. package/src/devcouncil/cli/commands/verify.py +0 -328
  63. package/src/devcouncil/cli/commands/version.py +0 -20
  64. package/src/devcouncil/cli/commands/watch.py +0 -574
  65. package/src/devcouncil/cli/commands/watch_fs.py +0 -40
  66. package/src/devcouncil/cli/main.py +0 -137
  67. package/src/devcouncil/council/__init__.py +0 -0
  68. package/src/devcouncil/council/prompts/__init__.py +0 -0
  69. package/src/devcouncil/council/prompts/arbiter.md +0 -19
  70. package/src/devcouncil/council/prompts/critic_a.md +0 -10
  71. package/src/devcouncil/council/prompts/critic_b.md +0 -10
  72. package/src/devcouncil/council/prompts/implementation_reviewer.md +0 -16
  73. package/src/devcouncil/council/prompts/planner_a.md +0 -16
  74. package/src/devcouncil/council/prompts/planner_b.md +0 -16
  75. package/src/devcouncil/council/prompts/rebuttal.md +0 -10
  76. package/src/devcouncil/council/prompts/spec_writer.md +0 -12
  77. package/src/devcouncil/domain/__init__.py +0 -0
  78. package/src/devcouncil/domain/assumption.py +0 -17
  79. package/src/devcouncil/domain/critique.py +0 -32
  80. package/src/devcouncil/domain/evidence.py +0 -47
  81. package/src/devcouncil/domain/gap.py +0 -52
  82. package/src/devcouncil/domain/requirement.py +0 -22
  83. package/src/devcouncil/domain/task.py +0 -55
  84. package/src/devcouncil/execution/__init__.py +0 -1
  85. package/src/devcouncil/execution/checkpoints.py +0 -246
  86. package/src/devcouncil/execution/context_builder.py +0 -60
  87. package/src/devcouncil/execution/executor.py +0 -15
  88. package/src/devcouncil/execution/fs_watcher.py +0 -180
  89. package/src/devcouncil/execution/handoff.py +0 -102
  90. package/src/devcouncil/execution/hook_policy.py +0 -253
  91. package/src/devcouncil/execution/patch.py +0 -77
  92. package/src/devcouncil/execution/paths.py +0 -14
  93. package/src/devcouncil/execution/permissions.py +0 -85
  94. package/src/devcouncil/execution/policy_engine.py +0 -343
  95. package/src/devcouncil/execution/prompt_builder.py +0 -671
  96. package/src/devcouncil/execution/shell_session.py +0 -225
  97. package/src/devcouncil/execution/task_runner.py +0 -170
  98. package/src/devcouncil/executors/__init__.py +0 -1
  99. package/src/devcouncil/executors/agent_registry.py +0 -575
  100. package/src/devcouncil/executors/coding_cli.py +0 -736
  101. package/src/devcouncil/executors/mini_swe.py +0 -73
  102. package/src/devcouncil/executors/native/__init__.py +0 -0
  103. package/src/devcouncil/executors/native/agent.py +0 -208
  104. package/src/devcouncil/executors/openhands.py +0 -71
  105. package/src/devcouncil/gating/__init__.py +0 -1
  106. package/src/devcouncil/gating/checks/__init__.py +0 -0
  107. package/src/devcouncil/gating/checks/clean_git.py +0 -52
  108. package/src/devcouncil/gating/checks/planned_files_check.py +0 -32
  109. package/src/devcouncil/gating/checks/requirement_coverage.py +0 -26
  110. package/src/devcouncil/gating/checks/secret_scan_check.py +0 -53
  111. package/src/devcouncil/gating/policy.py +0 -338
  112. package/src/devcouncil/hardware.py +0 -184
  113. package/src/devcouncil/indexing/__init__.py +0 -1
  114. package/src/devcouncil/indexing/ast_matcher.py +0 -168
  115. package/src/devcouncil/indexing/graph_index.py +0 -48
  116. package/src/devcouncil/indexing/lsp.py +0 -161
  117. package/src/devcouncil/indexing/repo_mapper.py +0 -1455
  118. package/src/devcouncil/indexing/semantic_index.py +0 -205
  119. package/src/devcouncil/integrations/actions.py +0 -146
  120. package/src/devcouncil/integrations/check.py +0 -423
  121. package/src/devcouncil/integrations/code_review_graph.py +0 -163
  122. package/src/devcouncil/integrations/github.py +0 -39
  123. package/src/devcouncil/integrations/github_intent.py +0 -142
  124. package/src/devcouncil/integrations/gitnexus.py +0 -62
  125. package/src/devcouncil/integrations/graphify.py +0 -34
  126. package/src/devcouncil/integrations/mcp/__init__.py +0 -0
  127. package/src/devcouncil/integrations/mcp/server.py +0 -2122
  128. package/src/devcouncil/integrations/opencode_devcouncil_plugin.mjs +0 -24
  129. package/src/devcouncil/integrations/pr_comments.py +0 -62
  130. package/src/devcouncil/live/__init__.py +0 -2
  131. package/src/devcouncil/live/cards.py +0 -349
  132. package/src/devcouncil/live/models.py +0 -63
  133. package/src/devcouncil/live/repair_prompt.py +0 -83
  134. package/src/devcouncil/live/reviewer.py +0 -70
  135. package/src/devcouncil/live/signals.py +0 -135
  136. package/src/devcouncil/live/summary.py +0 -34
  137. package/src/devcouncil/live/tasks.py +0 -18
  138. package/src/devcouncil/live/transcripts.py +0 -141
  139. package/src/devcouncil/llm/__init__.py +0 -1
  140. package/src/devcouncil/llm/cache.py +0 -42
  141. package/src/devcouncil/llm/model_defaults.yaml +0 -44
  142. package/src/devcouncil/llm/provider.py +0 -627
  143. package/src/devcouncil/llm/router.py +0 -310
  144. package/src/devcouncil/optimization/__init__.py +0 -1
  145. package/src/devcouncil/optimization/gepa_agent.py +0 -318
  146. package/src/devcouncil/planning/__init__.py +0 -1
  147. package/src/devcouncil/planning/arbiter_service.py +0 -57
  148. package/src/devcouncil/planning/correction_manifest.py +0 -303
  149. package/src/devcouncil/planning/critique_service.py +0 -71
  150. package/src/devcouncil/planning/plan_service.py +0 -60
  151. package/src/devcouncil/planning/prompt_enhancer_service.py +0 -167
  152. package/src/devcouncil/planning/repair_service.py +0 -39
  153. package/src/devcouncil/planning/spec_service.py +0 -70
  154. package/src/devcouncil/repo/__init__.py +0 -0
  155. package/src/devcouncil/repo/ci_scaffold.py +0 -157
  156. package/src/devcouncil/repo/gitignore.py +0 -123
  157. package/src/devcouncil/repo/sca.py +0 -374
  158. package/src/devcouncil/reporting/__init__.py +0 -0
  159. package/src/devcouncil/reporting/github_check.py +0 -32
  160. package/src/devcouncil/reporting/json_report.py +0 -30
  161. package/src/devcouncil/reporting/markdown_report.py +0 -83
  162. package/src/devcouncil/reporting/report_builder.py +0 -14
  163. package/src/devcouncil/skills/__init__.py +0 -19
  164. package/src/devcouncil/skills/library/README.md +0 -46
  165. package/src/devcouncil/skills/library/ai-training.md +0 -50
  166. package/src/devcouncil/skills/library/android.md +0 -50
  167. package/src/devcouncil/skills/library/backend.md +0 -52
  168. package/src/devcouncil/skills/library/core-engineering.md +0 -95
  169. package/src/devcouncil/skills/library/data-engineering.md +0 -47
  170. package/src/devcouncil/skills/library/desktop.md +0 -46
  171. package/src/devcouncil/skills/library/devops.md +0 -48
  172. package/src/devcouncil/skills/library/game-dev.md +0 -46
  173. package/src/devcouncil/skills/library/ios.md +0 -48
  174. package/src/devcouncil/skills/library/mobile-cross-platform.md +0 -46
  175. package/src/devcouncil/skills/library/security.md +0 -48
  176. package/src/devcouncil/skills/library/systems.md +0 -48
  177. package/src/devcouncil/skills/library/web.md +0 -47
  178. package/src/devcouncil/skills/library/windows.md +0 -47
  179. package/src/devcouncil/skills/registry.py +0 -330
  180. package/src/devcouncil/storage/__init__.py +0 -0
  181. package/src/devcouncil/storage/db.py +0 -147
  182. package/src/devcouncil/storage/models.py +0 -204
  183. package/src/devcouncil/storage/native.py +0 -557
  184. package/src/devcouncil/storage/repositories.py +0 -485
  185. package/src/devcouncil/telemetry/__init__.py +0 -0
  186. package/src/devcouncil/telemetry/cost.py +0 -140
  187. package/src/devcouncil/telemetry/model_pricing.yaml +0 -48
  188. package/src/devcouncil/telemetry/pricing.py +0 -28
  189. package/src/devcouncil/telemetry/traces.py +0 -146
  190. package/src/devcouncil/telemetry/tracker.py +0 -52
  191. package/src/devcouncil/ui/__init__.py +0 -1
  192. package/src/devcouncil/ui/dashboard.py +0 -423
  193. package/src/devcouncil/utils/__init__.py +0 -1
  194. package/src/devcouncil/utils/redaction.py +0 -147
  195. package/src/devcouncil/utils/subprocess_env.py +0 -69
  196. package/src/devcouncil/verification/__init__.py +0 -1
  197. package/src/devcouncil/verification/acceptance_compiler.py +0 -125
  198. package/src/devcouncil/verification/ad_hoc_check.py +0 -129
  199. package/src/devcouncil/verification/diff_coverage.py +0 -353
  200. package/src/devcouncil/verification/implementation_reviewer.py +0 -55
  201. package/src/devcouncil/verification/next_actions.py +0 -189
  202. package/src/devcouncil/verification/sandbox.py +0 -178
  203. package/src/devcouncil/verification/test_resolver.py +0 -91
  204. package/src/devcouncil/verification/verifier.py +0 -1548
  205. 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)