devcouncil 0.1.0 → 0.2.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.
- package/LICENSE +201 -201
- package/README.md +197 -494
- package/package.json +9 -2
- package/pyproject.toml +62 -27
- package/src/devcouncil/__main__.py +4 -4
- package/src/devcouncil/app/__init__.py +28 -28
- package/src/devcouncil/app/config.py +297 -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 +163 -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/assets/__init__.py +1 -0
- package/src/devcouncil/assets/devcouncil-logo.svg +60 -0
- package/src/devcouncil/assets/devcouncil_logo_premium.png +0 -0
- package/src/devcouncil/cli/commands/agents.py +292 -0
- package/src/devcouncil/cli/commands/artifacts.py +54 -48
- package/src/devcouncil/cli/commands/ast.py +22 -0
- package/src/devcouncil/cli/commands/baseline.py +35 -32
- package/src/devcouncil/cli/commands/check.py +209 -0
- package/src/devcouncil/cli/commands/config.py +115 -54
- package/src/devcouncil/cli/commands/cost.py +57 -0
- package/src/devcouncil/cli/commands/dashboard.py +31 -0
- package/src/devcouncil/cli/commands/doctor.py +291 -47
- package/src/devcouncil/cli/commands/evidence.py +48 -0
- package/src/devcouncil/cli/commands/go.py +656 -0
- package/src/devcouncil/cli/commands/handoff.py +69 -0
- package/src/devcouncil/cli/commands/hook.py +209 -33
- package/src/devcouncil/cli/commands/init.py +204 -57
- package/src/devcouncil/cli/commands/integrate.py +1171 -76
- package/src/devcouncil/cli/commands/lsp.py +20 -0
- package/src/devcouncil/cli/commands/map.py +96 -22
- package/src/devcouncil/cli/commands/plan.py +422 -210
- package/src/devcouncil/cli/commands/prompt.py +48 -34
- package/src/devcouncil/cli/commands/repair.py +89 -69
- package/src/devcouncil/cli/commands/report.py +120 -54
- package/src/devcouncil/cli/commands/reset_demo_state.py +33 -28
- package/src/devcouncil/cli/commands/rollback.py +55 -54
- package/src/devcouncil/cli/commands/run.py +285 -220
- package/src/devcouncil/cli/commands/runs.py +223 -0
- package/src/devcouncil/cli/commands/scaffold.py +32 -0
- package/src/devcouncil/cli/commands/semantic.py +47 -0
- package/src/devcouncil/cli/commands/setup.py +300 -20
- package/src/devcouncil/cli/commands/shell.py +73 -0
- package/src/devcouncil/cli/commands/show.py +76 -57
- package/src/devcouncil/cli/commands/skills.py +88 -0
- package/src/devcouncil/cli/commands/status.py +141 -105
- package/src/devcouncil/cli/commands/tasks.py +55 -41
- package/src/devcouncil/cli/commands/trace.py +49 -4
- package/src/devcouncil/cli/commands/verify.py +293 -128
- package/src/devcouncil/cli/commands/version.py +20 -20
- package/src/devcouncil/cli/commands/watch.py +574 -0
- package/src/devcouncil/cli/commands/watch_fs.py +40 -0
- package/src/devcouncil/cli/main.py +92 -25
- 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 +47 -27
- package/src/devcouncil/domain/gap.py +52 -26
- package/src/devcouncil/domain/requirement.py +22 -22
- package/src/devcouncil/domain/task.py +55 -26
- package/src/devcouncil/execution/__init__.py +1 -1
- package/src/devcouncil/execution/checkpoints.py +246 -0
- package/src/devcouncil/execution/context_builder.py +54 -54
- package/src/devcouncil/execution/executor.py +15 -15
- package/src/devcouncil/execution/fs_watcher.py +180 -0
- package/src/devcouncil/execution/handoff.py +102 -0
- package/src/devcouncil/execution/hook_policy.py +186 -77
- package/src/devcouncil/execution/patch.py +77 -28
- package/src/devcouncil/execution/permissions.py +52 -59
- package/src/devcouncil/execution/policy_engine.py +343 -0
- package/src/devcouncil/execution/prompt_builder.py +650 -38
- package/src/devcouncil/execution/shell_session.py +225 -0
- package/src/devcouncil/execution/task_runner.py +68 -64
- package/src/devcouncil/executors/__init__.py +1 -1
- package/src/devcouncil/executors/agent_registry.py +575 -0
- package/src/devcouncil/executors/coding_cli.py +736 -0
- package/src/devcouncil/executors/mini_swe.py +63 -63
- package/src/devcouncil/executors/native/agent.py +186 -85
- package/src/devcouncil/executors/openhands.py +56 -56
- package/src/devcouncil/gating/__init__.py +1 -1
- package/src/devcouncil/gating/checks/clean_git.py +52 -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 +53 -34
- package/src/devcouncil/gating/policy.py +315 -167
- package/src/devcouncil/hardware.py +184 -0
- 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 +161 -0
- package/src/devcouncil/indexing/repo_mapper.py +1455 -204
- package/src/devcouncil/indexing/semantic_index.py +205 -0
- package/src/devcouncil/integrations/actions.py +146 -0
- package/src/devcouncil/integrations/check.py +423 -0
- package/src/devcouncil/integrations/github.py +35 -35
- package/src/devcouncil/integrations/github_intent.py +142 -0
- package/src/devcouncil/integrations/gitnexus.py +62 -27
- package/src/devcouncil/integrations/graphify.py +34 -34
- package/src/devcouncil/integrations/mcp/server.py +2072 -96
- package/src/devcouncil/integrations/opencode_devcouncil_plugin.mjs +24 -0
- package/src/devcouncil/integrations/pr_comments.py +62 -0
- package/src/devcouncil/live/__init__.py +2 -0
- package/src/devcouncil/live/cards.py +349 -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 +141 -0
- package/src/devcouncil/llm/__init__.py +1 -1
- package/src/devcouncil/llm/cache.py +42 -38
- package/src/devcouncil/llm/model_defaults.yaml +44 -0
- package/src/devcouncil/llm/provider.py +627 -125
- package/src/devcouncil/llm/router.py +303 -118
- package/src/devcouncil/optimization/__init__.py +1 -0
- package/src/devcouncil/optimization/gepa_agent.py +318 -0
- package/src/devcouncil/planning/__init__.py +1 -1
- package/src/devcouncil/planning/arbiter_service.py +57 -57
- package/src/devcouncil/planning/correction_manifest.py +303 -0
- package/src/devcouncil/planning/critique_service.py +71 -66
- package/src/devcouncil/planning/plan_service.py +60 -46
- package/src/devcouncil/planning/prompt_enhancer_service.py +167 -0
- package/src/devcouncil/planning/repair_service.py +39 -39
- package/src/devcouncil/planning/spec_service.py +70 -44
- package/src/devcouncil/repo/ci_scaffold.py +157 -0
- package/src/devcouncil/repo/gitignore.py +123 -0
- package/src/devcouncil/repo/sca.py +374 -0
- package/src/devcouncil/reporting/github_check.py +32 -32
- package/src/devcouncil/reporting/json_report.py +30 -17
- package/src/devcouncil/reporting/markdown_report.py +83 -46
- package/src/devcouncil/reporting/report_builder.py +14 -14
- package/src/devcouncil/skills/__init__.py +19 -0
- package/src/devcouncil/skills/library/README.md +46 -0
- package/src/devcouncil/skills/library/ai-training.md +50 -0
- package/src/devcouncil/skills/library/android.md +50 -0
- package/src/devcouncil/skills/library/backend.md +52 -0
- package/src/devcouncil/skills/library/core-engineering.md +95 -0
- package/src/devcouncil/skills/library/data-engineering.md +47 -0
- package/src/devcouncil/skills/library/desktop.md +46 -0
- package/src/devcouncil/skills/library/devops.md +48 -0
- package/src/devcouncil/skills/library/game-dev.md +46 -0
- package/src/devcouncil/skills/library/ios.md +48 -0
- package/src/devcouncil/skills/library/mobile-cross-platform.md +46 -0
- package/src/devcouncil/skills/library/security.md +48 -0
- package/src/devcouncil/skills/library/systems.md +48 -0
- package/src/devcouncil/skills/library/web.md +47 -0
- package/src/devcouncil/skills/library/windows.md +47 -0
- package/src/devcouncil/skills/registry.py +330 -0
- package/src/devcouncil/storage/db.py +147 -66
- package/src/devcouncil/storage/models.py +204 -83
- package/src/devcouncil/storage/native.py +557 -0
- package/src/devcouncil/storage/repositories.py +388 -249
- package/src/devcouncil/telemetry/cost.py +140 -34
- package/src/devcouncil/telemetry/model_pricing.yaml +48 -0
- package/src/devcouncil/telemetry/pricing.py +28 -0
- package/src/devcouncil/telemetry/traces.py +62 -7
- package/src/devcouncil/telemetry/tracker.py +52 -49
- package/src/devcouncil/ui/__init__.py +1 -0
- package/src/devcouncil/ui/dashboard.py +423 -0
- package/src/devcouncil/utils/__init__.py +1 -1
- package/src/devcouncil/utils/redaction.py +147 -141
- package/src/devcouncil/utils/subprocess_env.py +69 -0
- package/src/devcouncil/verification/__init__.py +1 -1
- package/src/devcouncil/verification/acceptance_compiler.py +125 -0
- package/src/devcouncil/verification/ad_hoc_check.py +129 -0
- package/src/devcouncil/verification/diff_coverage.py +353 -0
- package/src/devcouncil/verification/implementation_reviewer.py +55 -55
- package/src/devcouncil/verification/next_actions.py +189 -0
- package/src/devcouncil/verification/sandbox.py +178 -0
- package/src/devcouncil/verification/test_resolver.py +91 -0
- package/src/devcouncil/verification/verifier.py +1342 -307
- package/uv.lock +205 -64
- package/src/devcouncil/indexing/symbol_index.py +0 -0
|
@@ -1,27 +1,62 @@
|
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
""
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+
AGENT_GUIDE_MARKER = "<!-- Managed by dev map: keep this file in sync with .devcouncil/repo_map.json. -->"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _agent_guide_text() -> str:
|
|
10
|
+
return "\n".join(
|
|
11
|
+
[
|
|
12
|
+
AGENT_GUIDE_MARKER,
|
|
13
|
+
"",
|
|
14
|
+
"# Agent Workspace Guide",
|
|
15
|
+
"",
|
|
16
|
+
"Use `.devcouncil/repo_map.json` as the primary file index for this workspace.",
|
|
17
|
+
"Repo map: `.devcouncil/repo_map.json`",
|
|
18
|
+
"",
|
|
19
|
+
"Workflow for agents:",
|
|
20
|
+
"1. Open `.devcouncil/repo_map.json` before guessing at file locations.",
|
|
21
|
+
"2. Use the `files` list to resolve module ownership and nearby siblings.",
|
|
22
|
+
"3. Run `dev map` again after large refactors to refresh the map.",
|
|
23
|
+
"",
|
|
24
|
+
"Important surfaces:",
|
|
25
|
+
"1. `src/devcouncil/cli/main.py` for CLI composition.",
|
|
26
|
+
"2. `src/devcouncil/app/orchestrator.py` and `src/devcouncil/app/state_machine.py` for lifecycle control.",
|
|
27
|
+
"3. `src/devcouncil/artifacts/graph.py` and `src/devcouncil/storage/repositories.py` for persistence and evidence.",
|
|
28
|
+
"4. `src/devcouncil/execution/` and `src/devcouncil/executors/` for task execution.",
|
|
29
|
+
"5. `src/devcouncil/verification/` and `src/devcouncil/gating/` for verification and policy gates.",
|
|
30
|
+
"",
|
|
31
|
+
"If the map and source disagree, trust the source and regenerate the map.",
|
|
32
|
+
]
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
class GitNexusIntegration:
|
|
36
|
+
"""
|
|
37
|
+
Integration for GitNexus: Codebase knowledge graph and structural awareness.
|
|
38
|
+
"""
|
|
39
|
+
def __init__(self, project_root: Path):
|
|
40
|
+
self.project_root = project_root
|
|
41
|
+
|
|
42
|
+
def initialize(self):
|
|
43
|
+
console.print("[cyan]Initializing GitNexus context...[/cyan]")
|
|
44
|
+
nexus_dir = self.project_root / ".devcouncil" / "nexus"
|
|
45
|
+
nexus_dir.mkdir(exist_ok=True)
|
|
46
|
+
# Mock initialization logic
|
|
47
|
+
(nexus_dir / "index_config.json").write_text('{"mode": "structural", "version": "1.0"}')
|
|
48
|
+
for filename in ("AGENTS.md", "CLAUDE.md"):
|
|
49
|
+
path = self.project_root / filename
|
|
50
|
+
if path.exists():
|
|
51
|
+
existing = path.read_text(encoding="utf-8")
|
|
52
|
+
if AGENT_GUIDE_MARKER not in existing:
|
|
53
|
+
continue
|
|
54
|
+
path.write_text(_agent_guide_text() + "\n", encoding="utf-8")
|
|
55
|
+
console.print(" - GitNexus structural awareness active.")
|
|
56
|
+
|
|
57
|
+
def sync_graph(self, graph_index: GraphIndex):
|
|
58
|
+
"""
|
|
59
|
+
Export DevCouncil artifact graph to GitNexus.
|
|
60
|
+
"""
|
|
61
|
+
console.print(" - Syncing DevCouncil artifacts to GitNexus...")
|
|
62
|
+
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
|