devcouncil 0.1.0 → 0.1.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/LICENSE +201 -201
- package/README.md +62 -543
- package/package.json +1 -1
- package/pyproject.toml +29 -26
- package/src/devcouncil/__main__.py +4 -4
- package/src/devcouncil/app/__init__.py +28 -28
- package/src/devcouncil/app/config.py +135 -108
- package/src/devcouncil/app/errors.py +23 -23
- package/src/devcouncil/app/events.py +44 -44
- package/src/devcouncil/app/orchestrator.py +67 -67
- package/src/devcouncil/app/project_status.py +29 -0
- package/src/devcouncil/app/run_context.py +39 -39
- package/src/devcouncil/app/state_machine.py +108 -108
- package/src/devcouncil/artifacts/__init__.py +1 -1
- package/src/devcouncil/artifacts/coverage.py +96 -96
- package/src/devcouncil/artifacts/graph.py +143 -143
- package/src/devcouncil/artifacts/migrations.py +20 -20
- package/src/devcouncil/artifacts/schemas.py +23 -23
- package/src/devcouncil/artifacts/serializer.py +21 -21
- package/src/devcouncil/artifacts/validators.py +27 -27
- package/src/devcouncil/cli/commands/artifacts.py +51 -48
- package/src/devcouncil/cli/commands/ast.py +22 -0
- package/src/devcouncil/cli/commands/baseline.py +35 -32
- package/src/devcouncil/cli/commands/config.py +76 -54
- package/src/devcouncil/cli/commands/dashboard.py +26 -0
- package/src/devcouncil/cli/commands/doctor.py +86 -42
- package/src/devcouncil/cli/commands/go.py +237 -0
- package/src/devcouncil/cli/commands/hook.py +96 -29
- package/src/devcouncil/cli/commands/init.py +67 -56
- package/src/devcouncil/cli/commands/integrate.py +320 -14
- package/src/devcouncil/cli/commands/lsp.py +20 -0
- package/src/devcouncil/cli/commands/map.py +25 -21
- package/src/devcouncil/cli/commands/plan.py +257 -206
- package/src/devcouncil/cli/commands/prompt.py +36 -33
- package/src/devcouncil/cli/commands/repair.py +72 -69
- package/src/devcouncil/cli/commands/report.py +112 -54
- package/src/devcouncil/cli/commands/reset_demo_state.py +31 -28
- package/src/devcouncil/cli/commands/rollback.py +49 -47
- package/src/devcouncil/cli/commands/run.py +252 -207
- package/src/devcouncil/cli/commands/setup.py +159 -18
- package/src/devcouncil/cli/commands/show.py +76 -57
- package/src/devcouncil/cli/commands/status.py +117 -105
- package/src/devcouncil/cli/commands/tasks.py +55 -41
- package/src/devcouncil/cli/commands/trace.py +2 -1
- package/src/devcouncil/cli/commands/verify.py +158 -128
- package/src/devcouncil/cli/commands/version.py +20 -20
- package/src/devcouncil/cli/commands/watch.py +574 -0
- package/src/devcouncil/cli/main.py +42 -24
- package/src/devcouncil/council/prompts/arbiter.md +19 -19
- package/src/devcouncil/council/prompts/critic_a.md +10 -10
- package/src/devcouncil/council/prompts/critic_b.md +10 -10
- package/src/devcouncil/council/prompts/implementation_reviewer.md +16 -16
- package/src/devcouncil/council/prompts/planner_a.md +16 -16
- package/src/devcouncil/council/prompts/planner_b.md +16 -16
- package/src/devcouncil/council/prompts/rebuttal.md +10 -10
- package/src/devcouncil/council/prompts/spec_writer.md +12 -12
- package/src/devcouncil/domain/assumption.py +17 -17
- package/src/devcouncil/domain/critique.py +32 -32
- package/src/devcouncil/domain/evidence.py +27 -27
- package/src/devcouncil/domain/gap.py +26 -26
- package/src/devcouncil/domain/requirement.py +22 -22
- package/src/devcouncil/domain/task.py +26 -26
- package/src/devcouncil/execution/__init__.py +1 -1
- package/src/devcouncil/execution/context_builder.py +54 -54
- package/src/devcouncil/execution/executor.py +15 -15
- package/src/devcouncil/execution/hook_policy.py +24 -3
- package/src/devcouncil/execution/patch.py +28 -28
- package/src/devcouncil/execution/permissions.py +44 -44
- package/src/devcouncil/execution/prompt_builder.py +23 -23
- package/src/devcouncil/execution/task_runner.py +63 -63
- package/src/devcouncil/executors/__init__.py +1 -1
- package/src/devcouncil/executors/coding_cli.py +112 -0
- package/src/devcouncil/executors/mini_swe.py +63 -63
- package/src/devcouncil/executors/native/agent.py +81 -81
- package/src/devcouncil/executors/openhands.py +56 -56
- package/src/devcouncil/gating/__init__.py +1 -1
- package/src/devcouncil/gating/checks/clean_git.py +50 -45
- package/src/devcouncil/gating/checks/planned_files_check.py +32 -32
- package/src/devcouncil/gating/checks/requirement_coverage.py +26 -26
- package/src/devcouncil/gating/checks/secret_scan_check.py +34 -34
- package/src/devcouncil/gating/policy.py +157 -157
- package/src/devcouncil/indexing/__init__.py +1 -1
- package/src/devcouncil/indexing/ast_matcher.py +168 -0
- package/src/devcouncil/indexing/graph_index.py +48 -48
- package/src/devcouncil/indexing/lsp.py +120 -0
- package/src/devcouncil/indexing/repo_mapper.py +208 -204
- package/src/devcouncil/integrations/github.py +35 -35
- package/src/devcouncil/integrations/gitnexus.py +27 -27
- package/src/devcouncil/integrations/graphify.py +34 -34
- package/src/devcouncil/integrations/mcp/server.py +549 -96
- package/src/devcouncil/integrations/pr_comments.py +62 -0
- package/src/devcouncil/live/__init__.py +2 -0
- package/src/devcouncil/live/cards.py +207 -0
- package/src/devcouncil/live/models.py +63 -0
- package/src/devcouncil/live/repair_prompt.py +83 -0
- package/src/devcouncil/live/reviewer.py +70 -0
- package/src/devcouncil/live/signals.py +135 -0
- package/src/devcouncil/live/summary.py +34 -0
- package/src/devcouncil/live/tasks.py +18 -0
- package/src/devcouncil/live/transcripts.py +138 -0
- package/src/devcouncil/llm/__init__.py +1 -1
- package/src/devcouncil/llm/cache.py +38 -38
- package/src/devcouncil/llm/provider.py +146 -125
- package/src/devcouncil/llm/router.py +111 -111
- package/src/devcouncil/planning/__init__.py +1 -1
- package/src/devcouncil/planning/arbiter_service.py +57 -57
- package/src/devcouncil/planning/critique_service.py +66 -66
- package/src/devcouncil/planning/plan_service.py +46 -46
- package/src/devcouncil/planning/prompt_enhancer_service.py +86 -0
- package/src/devcouncil/planning/repair_service.py +39 -39
- package/src/devcouncil/planning/spec_service.py +44 -44
- package/src/devcouncil/reporting/github_check.py +32 -32
- package/src/devcouncil/reporting/json_report.py +20 -17
- package/src/devcouncil/reporting/markdown_report.py +68 -46
- package/src/devcouncil/reporting/report_builder.py +14 -14
- package/src/devcouncil/storage/db.py +66 -66
- package/src/devcouncil/storage/models.py +83 -83
- package/src/devcouncil/storage/repositories.py +299 -222
- package/src/devcouncil/telemetry/cost.py +34 -34
- package/src/devcouncil/telemetry/tracker.py +49 -49
- package/src/devcouncil/ui/__init__.py +1 -0
- package/src/devcouncil/ui/dashboard.py +122 -0
- package/src/devcouncil/utils/__init__.py +1 -1
- package/src/devcouncil/utils/redaction.py +141 -141
- package/src/devcouncil/verification/__init__.py +1 -1
- package/src/devcouncil/verification/implementation_reviewer.py +55 -55
- package/src/devcouncil/verification/verifier.py +319 -302
- package/uv.lock +1 -1
|
@@ -2,38 +2,38 @@ import httpx
|
|
|
2
2
|
import logging
|
|
3
3
|
from devcouncil.artifacts.graph import ArtifactGraph
|
|
4
4
|
from devcouncil.reporting.github_check import GitHubCheckGenerator
|
|
5
|
-
|
|
6
|
-
logger = logging.getLogger(__name__)
|
|
7
|
-
|
|
8
|
-
class GitHubIntegration:
|
|
9
|
-
"""Manages interactions with GitHub API, specifically PR Checks."""
|
|
10
|
-
|
|
11
|
-
def __init__(self, github_token: str, repository: str, commit_sha: str):
|
|
12
|
-
self.github_token = github_token
|
|
13
|
-
self.repository = repository
|
|
14
|
-
self.commit_sha = commit_sha
|
|
15
|
-
self.base_url = f"https://api.github.com/repos/{repository}"
|
|
16
|
-
|
|
17
|
-
async def report_verification(self, graph: ArtifactGraph):
|
|
18
|
-
"""Creates or updates a GitHub Check Run with the current verification status."""
|
|
19
|
-
payload = GitHubCheckGenerator.generate(graph)
|
|
20
|
-
payload["head_sha"] = self.commit_sha
|
|
21
|
-
|
|
22
|
-
headers = {
|
|
23
|
-
"Authorization": f"Bearer {self.github_token}",
|
|
24
|
-
"Accept": "application/vnd.github.v3+json",
|
|
25
|
-
"Content-Type": "application/json"
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async with httpx.AsyncClient() as client:
|
|
29
|
-
try:
|
|
30
|
-
response = await client.post(
|
|
31
|
-
f"{self.base_url}/check-runs",
|
|
32
|
-
headers=headers,
|
|
33
|
-
json=payload
|
|
34
|
-
)
|
|
35
|
-
response.raise_for_status()
|
|
36
|
-
logger.info(f"GitHub PR Check updated for {self.repository} at {self.commit_sha}")
|
|
37
|
-
except Exception as e:
|
|
38
|
-
logger.error(f"Failed to report to GitHub: {e}")
|
|
39
|
-
raise
|
|
5
|
+
|
|
6
|
+
logger = logging.getLogger(__name__)
|
|
7
|
+
|
|
8
|
+
class GitHubIntegration:
|
|
9
|
+
"""Manages interactions with GitHub API, specifically PR Checks."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, github_token: str, repository: str, commit_sha: str):
|
|
12
|
+
self.github_token = github_token
|
|
13
|
+
self.repository = repository
|
|
14
|
+
self.commit_sha = commit_sha
|
|
15
|
+
self.base_url = f"https://api.github.com/repos/{repository}"
|
|
16
|
+
|
|
17
|
+
async def report_verification(self, graph: ArtifactGraph):
|
|
18
|
+
"""Creates or updates a GitHub Check Run with the current verification status."""
|
|
19
|
+
payload = GitHubCheckGenerator.generate(graph)
|
|
20
|
+
payload["head_sha"] = self.commit_sha
|
|
21
|
+
|
|
22
|
+
headers = {
|
|
23
|
+
"Authorization": f"Bearer {self.github_token}",
|
|
24
|
+
"Accept": "application/vnd.github.v3+json",
|
|
25
|
+
"Content-Type": "application/json"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async with httpx.AsyncClient() as client:
|
|
29
|
+
try:
|
|
30
|
+
response = await client.post(
|
|
31
|
+
f"{self.base_url}/check-runs",
|
|
32
|
+
headers=headers,
|
|
33
|
+
json=payload
|
|
34
|
+
)
|
|
35
|
+
response.raise_for_status()
|
|
36
|
+
logger.info(f"GitHub PR Check updated for {self.repository} at {self.commit_sha}")
|
|
37
|
+
except Exception as e:
|
|
38
|
+
logger.error(f"Failed to report to GitHub: {e}")
|
|
39
|
+
raise
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
from rich.console import Console
|
|
3
|
-
from devcouncil.indexing.graph_index import GraphIndex
|
|
4
|
-
|
|
5
|
-
console = Console()
|
|
6
|
-
|
|
7
|
-
class GitNexusIntegration:
|
|
8
|
-
"""
|
|
9
|
-
Integration for GitNexus: Codebase knowledge graph and structural awareness.
|
|
10
|
-
"""
|
|
11
|
-
def __init__(self, project_root: Path):
|
|
12
|
-
self.project_root = project_root
|
|
13
|
-
|
|
14
|
-
def initialize(self):
|
|
15
|
-
console.print("[cyan]Initializing GitNexus context...[/cyan]")
|
|
16
|
-
nexus_dir = self.project_root / ".devcouncil" / "nexus"
|
|
17
|
-
nexus_dir.mkdir(exist_ok=True)
|
|
18
|
-
# Mock initialization logic
|
|
19
|
-
(nexus_dir / "index_config.json").write_text('{"mode": "structural", "version": "1.0"}')
|
|
20
|
-
console.print(" - GitNexus structural awareness active.")
|
|
21
|
-
|
|
22
|
-
def sync_graph(self, graph_index: GraphIndex):
|
|
23
|
-
"""
|
|
24
|
-
Export DevCouncil artifact graph to GitNexus.
|
|
25
|
-
"""
|
|
26
|
-
console.print(" - Syncing DevCouncil artifacts to GitNexus...")
|
|
27
|
-
pass
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
from devcouncil.indexing.graph_index import GraphIndex
|
|
4
|
+
|
|
5
|
+
console = Console()
|
|
6
|
+
|
|
7
|
+
class GitNexusIntegration:
|
|
8
|
+
"""
|
|
9
|
+
Integration for GitNexus: Codebase knowledge graph and structural awareness.
|
|
10
|
+
"""
|
|
11
|
+
def __init__(self, project_root: Path):
|
|
12
|
+
self.project_root = project_root
|
|
13
|
+
|
|
14
|
+
def initialize(self):
|
|
15
|
+
console.print("[cyan]Initializing GitNexus context...[/cyan]")
|
|
16
|
+
nexus_dir = self.project_root / ".devcouncil" / "nexus"
|
|
17
|
+
nexus_dir.mkdir(exist_ok=True)
|
|
18
|
+
# Mock initialization logic
|
|
19
|
+
(nexus_dir / "index_config.json").write_text('{"mode": "structural", "version": "1.0"}')
|
|
20
|
+
console.print(" - GitNexus structural awareness active.")
|
|
21
|
+
|
|
22
|
+
def sync_graph(self, graph_index: GraphIndex):
|
|
23
|
+
"""
|
|
24
|
+
Export DevCouncil artifact graph to GitNexus.
|
|
25
|
+
"""
|
|
26
|
+
console.print(" - Syncing DevCouncil artifacts to GitNexus...")
|
|
27
|
+
pass
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
from rich.console import Console
|
|
3
|
-
|
|
4
|
-
console = Console()
|
|
5
|
-
|
|
6
|
-
class GraphifyIntegration:
|
|
7
|
-
"""
|
|
8
|
-
Integration for graphify: Always-on graph context and multi-agent integration.
|
|
9
|
-
"""
|
|
10
|
-
def __init__(self, project_root: Path):
|
|
11
|
-
self.project_root = project_root
|
|
12
|
-
|
|
13
|
-
def initialize(self):
|
|
14
|
-
console.print("[magenta]Initializing Graphify engine...[/magenta]")
|
|
15
|
-
graphify_config = self.project_root / ".devcouncil" / "graphify.yaml"
|
|
16
|
-
# Create a default graphify config
|
|
17
|
-
content = """
|
|
18
|
-
graph:
|
|
19
|
-
engine: internal
|
|
20
|
-
persist: true
|
|
21
|
-
agents:
|
|
22
|
-
shared_context: true
|
|
23
|
-
hooks:
|
|
24
|
-
enabled: true
|
|
25
|
-
"""
|
|
26
|
-
graphify_config.write_text(content.strip())
|
|
27
|
-
console.print(" - Graphify engine configured and ready.")
|
|
28
|
-
|
|
29
|
-
def apply_rules(self):
|
|
30
|
-
"""
|
|
31
|
-
Apply graph-based rules to implementation plans.
|
|
32
|
-
"""
|
|
33
|
-
console.print(" - Graphify checking architectural rules...")
|
|
34
|
-
pass
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
|
|
4
|
+
console = Console()
|
|
5
|
+
|
|
6
|
+
class GraphifyIntegration:
|
|
7
|
+
"""
|
|
8
|
+
Integration for graphify: Always-on graph context and multi-agent integration.
|
|
9
|
+
"""
|
|
10
|
+
def __init__(self, project_root: Path):
|
|
11
|
+
self.project_root = project_root
|
|
12
|
+
|
|
13
|
+
def initialize(self):
|
|
14
|
+
console.print("[magenta]Initializing Graphify engine...[/magenta]")
|
|
15
|
+
graphify_config = self.project_root / ".devcouncil" / "graphify.yaml"
|
|
16
|
+
# Create a default graphify config
|
|
17
|
+
content = """
|
|
18
|
+
graph:
|
|
19
|
+
engine: internal
|
|
20
|
+
persist: true
|
|
21
|
+
agents:
|
|
22
|
+
shared_context: true
|
|
23
|
+
hooks:
|
|
24
|
+
enabled: true
|
|
25
|
+
"""
|
|
26
|
+
graphify_config.write_text(content.strip())
|
|
27
|
+
console.print(" - Graphify engine configured and ready.")
|
|
28
|
+
|
|
29
|
+
def apply_rules(self):
|
|
30
|
+
"""
|
|
31
|
+
Apply graph-based rules to implementation plans.
|
|
32
|
+
"""
|
|
33
|
+
console.print(" - Graphify checking architectural rules...")
|
|
34
|
+
pass
|