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.
Files changed (205) hide show
  1. package/README.md +144 -308
  2. package/bin/devcouncil.js +130 -32
  3. package/package.json +22 -19
  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,137 +0,0 @@
1
- import sys
2
-
3
- import typer
4
-
5
-
6
- def _configure_stdio() -> None:
7
- """Make stdout/stderr resilient to non-cp1252 characters.
8
-
9
- Coding agents and rich output emit Unicode such as ``✓``. On Windows the
10
- default console / redirected-pipe encoding is cp1252, where an un-encodable
11
- character raises UnicodeEncodeError mid-write. Because Rich buffers output,
12
- that error can surface during an unrelated later write — which previously
13
- got misreported as a coding agent "failing to start". Reconfigure both
14
- streams to UTF-8 with replacement so output can never crash the process.
15
- """
16
- for stream in (sys.stdout, sys.stderr):
17
- reconfigure = getattr(stream, "reconfigure", None)
18
- if reconfigure is None:
19
- continue
20
- try:
21
- reconfigure(encoding="utf-8", errors="replace")
22
- except (ValueError, OSError):
23
- try:
24
- reconfigure(errors="replace")
25
- except (ValueError, OSError):
26
- pass
27
-
28
-
29
- _configure_stdio()
30
-
31
- from devcouncil.cli.commands import ( # noqa: E402 - imports follow stdio reconfiguration
32
- artifacts,
33
- agents,
34
- baseline,
35
- check,
36
- config,
37
- cost,
38
- ast,
39
- dashboard,
40
- doctor,
41
- go,
42
- hook,
43
- init,
44
- integrate,
45
- lsp,
46
- map,
47
- mcp_server,
48
- plan,
49
- prompt,
50
- repair,
51
- report,
52
- reset_demo_state,
53
- rollback,
54
- run,
55
- runs,
56
- setup,
57
- show,
58
- status,
59
- tasks,
60
- trace,
61
- verify,
62
- version,
63
- watch,
64
- shell,
65
- semantic,
66
- evidence,
67
- handoff,
68
- skills,
69
- scaffold,
70
- )
71
- from devcouncil.cli.commands.watch_fs import watch_fs # noqa: E402 - imports follow stdio reconfiguration
72
-
73
- app = typer.Typer(
74
- name="dev",
75
- help="DevCouncil: Gated orchestrator for AI-assisted software development.",
76
- add_completion=False,
77
- )
78
-
79
- # Typer subcommands (those using app = Typer())
80
- app.add_typer(init.app, name="init")
81
- app.add_typer(doctor.app, name="doctor")
82
- app.add_typer(tasks.app, name="tasks")
83
- app.add_typer(report.app, name="report")
84
- app.add_typer(rollback.app, name="rollback")
85
- app.add_typer(config.app, name="config")
86
- app.add_typer(artifacts.app, name="artifacts")
87
- app.add_typer(agents.app, name="agents")
88
- app.add_typer(hook.app, name="hook")
89
- app.add_typer(version.app, name="version")
90
- app.add_typer(mcp_server.app, name="mcp-server")
91
- app.add_typer(integrate.app, name="integrate")
92
- app.add_typer(integrate.app, name="integrations")
93
- app.add_typer(trace.app, name="trace")
94
- app.add_typer(cost.app, name="cost")
95
- app.add_typer(runs.app, name="runs")
96
- app.add_typer(setup.app, name="setup")
97
- app.add_typer(lsp.app, name="lsp")
98
- app.add_typer(ast.app, name="ast")
99
- app.add_typer(dashboard.app, name="dashboard")
100
- app.add_typer(watch.app, name="watch")
101
- app.add_typer(semantic.app, name="semantic")
102
- app.add_typer(evidence.app, name="evidence")
103
- app.add_typer(skills.app, name="skills")
104
- watch.app.command("fs")(watch_fs)
105
-
106
- # Direct command registrations (those defined as def cmd())
107
- app.command(name="baseline")(baseline.baseline)
108
- app.command(name="e2e")(go.go)
109
- app.command(name="go")(go.go)
110
- app.command(name="map")(map.map_repo)
111
- app.command(name="scaffold-ci")(scaffold.scaffold_ci_command)
112
- app.command(name="plan")(plan.plan)
113
- app.command(name="approve")(plan.approve)
114
- app.command(name="prompt")(prompt.prompt)
115
- app.command(name="reset-demo-state")(reset_demo_state.reset_demo_state)
116
- app.command(name="run")(run.run)
117
- # shell/handoff take a positional TASK_ID followed by options, so they must be
118
- # plain commands — as typer sub-apps (click groups) the documented
119
- # `dev shell TASK-001 --command ...` form fails to parse.
120
- app.command(name="shell")(shell.shell)
121
- app.command(name="handoff")(handoff.handoff)
122
- app.command(name="show")(show.show)
123
- app.command(name="verify")(verify.verify)
124
- app.command(name="check")(check.check)
125
- app.command(name="repair")(repair.repair)
126
- app.command(name="status")(status.status)
127
- app.command(name="optimize")(agents.optimize_agent)
128
-
129
- @app.callback()
130
- def main(ctx: typer.Context):
131
- """
132
- DevCouncil: Gated orchestrator for AI-assisted software development.
133
- """
134
- return
135
-
136
- if __name__ == "__main__":
137
- app()
File without changes
File without changes
@@ -1,19 +0,0 @@
1
- Goal: {goal}
2
-
3
- Initial Requirements:
4
- {requirements_json}
5
-
6
- Plan A: {plan_a_json}
7
- Plan B: {plan_b_json}
8
-
9
- Critique of Plan B by Critic A: {critique_a_json}
10
- Critique of Plan A by Critic B: {critique_b_json}
11
-
12
- Rebuttal of Critic B by Planner A: {rebuttal_a_json}
13
- Rebuttal of Critic A by Planner B: {rebuttal_b_json}
14
-
15
- You are the arbiter engineering manager. Your goal is to produce the final, definitive set of requirements and tasks.
16
- - You do not decide by vibes.
17
- - High-severity unrefuted findings from critics must be incorporated into the final requirements or tasks.
18
- - If a planner successfully rebutted a finding, you may skip it.
19
- - Produce a single, coherent task graph.
@@ -1,10 +0,0 @@
1
- Requirements:
2
- {requirements_json}
3
-
4
- Target Plan:
5
- {target_plan_json}
6
-
7
- You are a hostile staff engineer reviewing another team's implementation plan.
8
- Find missing requirements, bad assumptions, missing tests, security risks, migration risks, and unverifiable claims.
9
- Do not praise. Do not rewrite the plan.
10
- Every finding must include a falsifiable_check.
@@ -1,10 +0,0 @@
1
- Requirements:
2
- {requirements_json}
3
-
4
- Target Plan:
5
- {target_plan_json}
6
-
7
- You are a hostile staff engineer reviewing another team's implementation plan.
8
- Find missing requirements, bad assumptions, missing tests, security risks, migration risks, and unverifiable claims.
9
- Do not praise. Do not rewrite the plan.
10
- Every finding must include a falsifiable_check.
@@ -1,16 +0,0 @@
1
- You are an expert software reviewer. Review the following code changes against the task requirements.
2
- Task: {task.title}
3
- Description: {task.description}
4
-
5
- Requirements:
6
- {requirements_json}
7
-
8
- Code Diff:
9
- {diff}
10
-
11
- Your task is to identify if the implementation is complete, correct, and follows best practices.
12
- - Identify missing edge cases.
13
- - Identify architectural drift.
14
- - Identify security risks not caught by static scans.
15
-
16
- Return a JSON object with 'is_satisfactory' and a list of 'findings' (as Gap objects).
@@ -1,16 +0,0 @@
1
- Goal: {goal}
2
-
3
- Requirements:
4
- {requirements_json}
5
-
6
- Repository Map:
7
- {repo_map_json}
8
-
9
- Your task is to create a detailed implementation plan.
10
- - Break down the requirements into atomic implementation tasks.
11
- - For each task, specify which files will be created or modified.
12
- - Specify which tests are expected to verify the task.
13
- - Ensure each task maps back to at least one requirement.
14
-
15
- Role-specific instructions:
16
- You are the pragmatic tech lead. Optimize for simplicity and minimal dependencies.
@@ -1,16 +0,0 @@
1
- Goal: {goal}
2
-
3
- Requirements:
4
- {requirements_json}
5
-
6
- Repository Map:
7
- {repo_map_json}
8
-
9
- Your task is to create a detailed implementation plan.
10
- - Break down the requirements into atomic implementation tasks.
11
- - For each task, specify which files will be created or modified.
12
- - Specify which tests are expected to verify the task.
13
- - Ensure each task maps back to at least one requirement.
14
-
15
- Role-specific instructions:
16
- You are the production-readiness architect. Optimize for security, performance, edge cases, failure modes, and maintainability. Assume the first plan will miss subtle requirements.
@@ -1,10 +0,0 @@
1
- Original Plan:
2
- {original_plan_json}
3
-
4
- Critique Findings:
5
- {findings_json}
6
-
7
- You are the planner who created the original plan. Review the critique findings.
8
- - A finding can be rejected only with artifact evidence or strong justification.
9
- - A finding can be accepted and converted into a requirement/task/test.
10
- - No hand-wavy rebuttals.
@@ -1,12 +0,0 @@
1
- Goal: {goal}
2
-
3
- Repository Map:
4
- {repo_map_json}
5
-
6
- Your task is to draft the initial software specification for this goal.
7
- 1. Identify functional and non-functional requirements.
8
- 2. Extract any assumptions you are making about the codebase or architecture.
9
- 3. List any blocking questions that the user must answer before implementation can proceed.
10
-
11
- Each requirement MUST have clear acceptance criteria with verification methods.
12
- Each assumption MUST have a confidence and impact level.
File without changes
@@ -1,17 +0,0 @@
1
- from pydantic import BaseModel, Field
2
- from typing import Literal, List
3
-
4
- class Assumption(BaseModel):
5
- id: str
6
- statement: str
7
- confidence: Literal["low", "medium", "high"]
8
- impact: Literal["low", "medium", "high"]
9
- reversible: bool
10
- requires_user_confirmation: bool
11
- linked_requirement_ids: List[str] = Field(default_factory=list)
12
- status: Literal[
13
- "open",
14
- "confirmed",
15
- "rejected",
16
- "converted_to_requirement"
17
- ] = "open"
@@ -1,32 +0,0 @@
1
- from pydantic import BaseModel
2
- from typing import Literal, Optional
3
-
4
- class CritiqueFinding(BaseModel):
5
- id: str
6
- source_agent: str
7
- target_plan_id: str
8
- severity: Literal["low", "medium", "high", "critical"]
9
- finding_type: Literal[
10
- "missing_requirement",
11
- "missing_task",
12
- "missing_test",
13
- "bad_assumption",
14
- "architecture_risk",
15
- "security_risk",
16
- "performance_risk",
17
- "dependency_risk",
18
- "migration_risk",
19
- "unverifiable_acceptance_criteria"
20
- ]
21
- claim: str
22
- linked_requirement_id: Optional[str] = None
23
- suggested_requirement: Optional[str] = None
24
- suggested_task: Optional[str] = None
25
- falsifiable_check: str
26
- status: Literal[
27
- "open",
28
- "accepted",
29
- "rejected",
30
- "converted",
31
- "needs_user"
32
- ] = "open"
@@ -1,47 +0,0 @@
1
- from pydantic import BaseModel, Field
2
- from typing import Literal, List, Dict
3
-
4
- class CommandResult(BaseModel):
5
- command: str
6
- exit_code: int
7
- stdout_path: str
8
- stderr_path: str
9
- summary: str
10
-
11
- class DiffEvidence(BaseModel):
12
- task_id: str
13
- changed_files: List[str]
14
- added_files: List[str]
15
- deleted_files: List[str]
16
- diff_summary: str
17
-
18
- class DiffCoverageEvidence(BaseModel):
19
- """Proof that the changed lines were (or were not) exercised by the tests.
20
-
21
- This is the executable evidence behind DevCouncil's core promise: a passing
22
- suite is only acceptance evidence if the lines the diff changed were actually
23
- run. ``measured`` is False when no reliable signal could be computed (no
24
- coverage tool, no instrumentable test command, or no changed executable
25
- lines), in which case it must never be read as a defect.
26
- """
27
-
28
- task_id: str
29
- tool: str = ""
30
- measured: bool = False
31
- changed_lines: int = 0
32
- covered_lines: int = 0
33
- coverage_ratio: float = 0.0
34
- uncovered_by_file: Dict[str, List[int]] = Field(default_factory=dict)
35
- absent_files: List[str] = Field(default_factory=list)
36
- summary: str = ""
37
-
38
- class VerificationEvidence(BaseModel):
39
- __test__ = False # Prevent pytest from collecting this as a test class
40
- requirement_id: str
41
- acceptance_criterion_id: str
42
- command: str
43
- status: Literal["passed", "failed", "not_run"]
44
- evidence_summary: str
45
-
46
- # Backward-compatible alias
47
- TestEvidence = VerificationEvidence
@@ -1,52 +0,0 @@
1
- from pydantic import BaseModel, Field
2
- from typing import Literal, List, Optional
3
-
4
- class Gap(BaseModel):
5
- id: str
6
- severity: Literal["low", "medium", "high", "critical"]
7
- gap_type: Literal[
8
- "requirement_not_planned",
9
- "task_not_implemented",
10
- "planned_file_not_changed",
11
- "orphan_diff",
12
- "missing_test",
13
- "test_failed",
14
- "invalid_verification_command",
15
- "acceptance_criteria_unproven",
16
- "diff_not_exercised",
17
- "assumption_violated",
18
- "architecture_drift",
19
- "security_risk",
20
- "dependency_risk",
21
- "migration_gap",
22
- "quality_gate_failed",
23
- "skipped_verification_command",
24
- "coarse_acceptance_proof",
25
- ]
26
- requirement_id: Optional[str] = None
27
- task_id: Optional[str] = None
28
- description: str
29
- evidence: List[str] = Field(default_factory=list)
30
- recommended_fix: str
31
- blocking: bool
32
- # Machine-actionable hints for the agent self-repair loop. Populated at gap
33
- # creation where known; consumed by the typed next-actions contract (see
34
- # devcouncil.verification.next_actions). As of schema v4 these are persisted by
35
- # the gap store and round-tripped on reload, so a reconnecting agent gets the
36
- # full repair contract rather than a heuristic reconstruction.
37
- file: Optional[str] = None
38
- line: Optional[int] = None
39
- suggested_command: Optional[str] = None
40
- # The acceptance criterion this gap is about (when applicable), so the agent can
41
- # tie a failure straight back to the criterion it must satisfy.
42
- acceptance_criterion_id: Optional[str] = None
43
- # Paths to the captured stdout/stderr logs (written under .devcouncil/logs) for the
44
- # failing command behind this gap, so the agent can open the FULL failure output
45
- # without re-running. Optional and defaulted for backward compatibility; the gap
46
- # store does not persist these, so they are only present on a fresh verify run.
47
- stdout_path: Optional[str] = None
48
- stderr_path: Optional[str] = None
49
- # Expected verification method (e.g. "unit_test"/"static_check") for an unproven
50
- # acceptance criterion, so missing-evidence routing is concrete rather than a
51
- # restatement of the description.
52
- expected_verification_method: Optional[str] = None
@@ -1,22 +0,0 @@
1
- from pydantic import BaseModel, Field
2
- from typing import Literal, List
3
-
4
- class AcceptanceCriterion(BaseModel):
5
- id: str
6
- description: str
7
- verification_method: Literal[
8
- "unit_test",
9
- "integration_test",
10
- "manual",
11
- "static_check",
12
- "llm_review"
13
- ]
14
- required: bool = True
15
-
16
- class Requirement(BaseModel):
17
- id: str
18
- title: str
19
- description: str
20
- priority: Literal["low", "medium", "high", "critical"]
21
- source: Literal["user", "planner", "critic", "arbiter"]
22
- acceptance_criteria: List[AcceptanceCriterion] = Field(default_factory=list)
@@ -1,55 +0,0 @@
1
- from pydantic import BaseModel, Field
2
- from typing import Literal, List
3
-
4
- class PlannedFile(BaseModel):
5
- path: str
6
- reason: str
7
- allowed_change: Literal["create", "modify", "delete", "read_only"]
8
-
9
- class Task(BaseModel):
10
- id: str
11
- title: str
12
- description: str
13
- requirement_ids: List[str] = Field(default_factory=list)
14
- acceptance_criterion_ids: List[str] = Field(default_factory=list)
15
- planned_files: List[PlannedFile] = Field(default_factory=list)
16
- expected_tests: List[str] = Field(
17
- default_factory=list,
18
- description=(
19
- "Runnable shell commands (not prose) that prove this task's acceptance "
20
- "criteria when they exit 0; they are executed verbatim by the verifier. "
21
- "They must run right after THIS task with no missing tools or test files. "
22
- "Prefer self-contained inline assertions, e.g. "
23
- "python -c \"import calc; assert calc.subtract(10,3)==7\". Use pytest only "
24
- "on a test file this or an earlier task creates, running the whole file "
25
- "(python -m pytest tests/test_x.py -q), never a ::name node. Do not use "
26
- "linters/type-checkers (flake8, mypy, ruff, eslint, tsc, npm) unless the "
27
- "repo is already configured for them."
28
- ),
29
- )
30
- allowed_commands: List[str] = Field(
31
- default_factory=list,
32
- description=(
33
- "Shell commands the executor and verifier are permitted to run for this "
34
- "task (build/test/lint commands the implementation may invoke). Literal "
35
- "commands only, e.g. 'python -m pytest -q', 'uv run pytest'. Leave empty "
36
- "only when the task needs no commands beyond those in expected_tests."
37
- ),
38
- )
39
- forbidden_changes: List[str] = Field(default_factory=list)
40
- depends_on: List[str] = Field(
41
- default_factory=list,
42
- description=(
43
- "IDs of tasks that must complete before this one (e.g. a task that creates a "
44
- "module this task imports/tests). Used to order execution and to skip a task "
45
- "whose prerequisites are unmet rather than letting it fail spuriously."
46
- ),
47
- )
48
- status: Literal[
49
- "planned",
50
- "ready",
51
- "running",
52
- "blocked",
53
- "verified",
54
- "done"
55
- ] = "planned"
@@ -1 +0,0 @@
1
-