devflow-toolkit 0.3.4__py3-none-any.whl → 0.3.5__py3-none-any.whl

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.
devflow/cli.py CHANGED
@@ -35,7 +35,7 @@ def version() -> None:
35
35
  try:
36
36
  current_version = package_version("devflow-toolkit")
37
37
  except PackageNotFoundError:
38
- current_version = "0.3.4"
38
+ current_version = "0.3.5"
39
39
  console.print(f"DevFlow v{current_version}")
40
40
 
41
41
 
@@ -57,7 +57,7 @@ def _approve(spec_id: str, path: Path, stage: str) -> None:
57
57
  normalized = stage.strip().lower()
58
58
  if normalized != "spec":
59
59
  msg = (
60
- f"Stage '{stage}' is not available in DevFlow 0.3.4. "
60
+ f"Stage '{stage}' is not available in DevFlow 0.3.5. "
61
61
  "Only the 'spec' stage can be approved."
62
62
  )
63
63
  raise UnsupportedStageError(msg)
@@ -38,16 +38,38 @@ def resolve_harness(
38
38
  *,
39
39
  allow_prompt: bool,
40
40
  require_installed: bool,
41
+ force_prompt: bool = False,
41
42
  ) -> tuple[str | None, list[str]]:
42
- """Resolve ``auto`` and verify that concrete harnesses exist."""
43
+ """Resolve ``auto`` and verify that concrete harnesses exist.
44
+
45
+ When ``force_prompt`` is true and the terminal is interactive, the
46
+ user is asked to choose a harness even if one is already configured.
47
+ """
43
48
  canonical = validate_harness_name(requested)
44
49
  if canonical == "none":
45
50
  return None, []
46
51
 
52
+ detected = detect_harnesses()
53
+ if force_prompt and allow_prompt:
54
+ names = [harness.name for harness in detected]
55
+ if not names:
56
+ return None, [
57
+ "No supported agent harness was found on PATH. DevFlow will use "
58
+ "deterministic static analysis.",
59
+ ]
60
+ default = canonical if canonical in names else names[0]
61
+ chosen = _prompt_for_harness(
62
+ names,
63
+ default=default,
64
+ include_none=True,
65
+ )
66
+ if chosen is None or chosen == "none":
67
+ return None, []
68
+ return chosen, []
69
+
47
70
  if canonical != "auto" and not require_installed:
48
71
  return canonical, []
49
72
 
50
- detected = detect_harnesses()
51
73
  prompt = _prompt_for_harness if allow_prompt else None
52
74
  selection = select_harness(canonical, detected, prompt=prompt)
53
75
  return selection.harness, list(selection.warnings)
@@ -82,17 +104,29 @@ def print_setup_result(
82
104
  console.print(f"[yellow]Warning:[/yellow] {warning}")
83
105
 
84
106
 
85
- def _prompt_for_harness(names: list[str]) -> str | None:
107
+ def _prompt_for_harness(
108
+ names: list[str],
109
+ *,
110
+ default: str | None = None,
111
+ include_none: bool = False,
112
+ ) -> str | None:
86
113
  if not sys.stdin.isatty():
87
114
  return None
88
- typer.echo("Multiple agent harnesses are installed:")
115
+ choices = [*names]
116
+ if include_none:
117
+ choices.append("none")
118
+ typer.echo("Available agent harnesses:")
89
119
  for name in names:
90
- typer.echo(f" - {name}")
120
+ suffix = " (configured)" if name == default else ""
121
+ typer.echo(f" - {name}{suffix}")
122
+ if include_none:
123
+ typer.echo(" - none (deterministic static analysis)")
91
124
  while True:
92
125
  answer = typer.prompt(
93
- "Agent harness (" + "/".join(names) + ")",
126
+ "Agent harness (" + "/".join(choices) + ")",
127
+ default=default or "",
94
128
  )
95
129
  canonical = canonical_harness_name(answer)
96
- if canonical in names:
130
+ if canonical in choices:
97
131
  return canonical
98
- typer.echo(f"Choose one of: {', '.join(names)}")
132
+ typer.echo(f"Choose one of: {', '.join(choices)}")
devflow/commands/spec.py CHANGED
@@ -188,6 +188,7 @@ def _create_specification(
188
188
  requested_harness = validate_harness_name(
189
189
  "none" if no_agent else (harness or config.agent_harness)
190
190
  )
191
+ explicit_harness = no_agent or harness is not None
191
192
  execution_mode, mode_warnings = _execution_mode(
192
193
  mode or config.execution_mode,
193
194
  )
@@ -208,6 +209,7 @@ def _create_specification(
208
209
  requested_harness,
209
210
  allow_prompt=allow_prompt,
210
211
  require_installed=True,
212
+ force_prompt=not explicit_harness,
211
213
  )
212
214
  adapter = adapter_for(selected_harness) if selected_harness else None
213
215
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: Specification workflow toolkit for AI-assisted software changes
5
5
  Author: DevFlow contributors
6
6
  License-Expression: MIT
@@ -42,7 +42,7 @@ anyone starts implementing it. DevFlow owns the workflow state; the
42
42
  selected agent harness is only the execution backend that drafts the
43
43
  specification.
44
44
 
45
- This is the `0.3.4` MVP. It implements the **discovery and
45
+ This is the `0.3.5` MVP. It implements the **discovery and
46
46
  specification stages only**. It supports two specification contexts:
47
47
  **Existing Project** (the default) and **Greenfield**. It is not a
48
48
  complete SDD platform and does not include planning, implementation or
@@ -118,7 +118,7 @@ pip install devflow-toolkit
118
118
  To install a specific built artifact instead:
119
119
 
120
120
  ```bash
121
- pip install devflow_toolkit-0.3.4-py3-none-any.whl
121
+ pip install devflow_toolkit-0.3.5-py3-none-any.whl
122
122
  ```
123
123
 
124
124
  Verify the installation:
@@ -282,7 +282,7 @@ as an architectural constraint when it is present.
282
282
 
283
283
  ### Harnesses
284
284
 
285
- | Harness | Status in 0.3.4 |
285
+ | Harness | Status in 0.3.5 |
286
286
  | --- | --- |
287
287
  | OpenCode | Verified end-to-end in non-interactive mode |
288
288
  | Codex | Integration files are generated, but not verified for this release |
@@ -432,7 +432,7 @@ specification that still lists open questions.
432
432
  8. If artifacts exist without workflow state, diagnose with
433
433
  `devflow doctor <id>` and repair with `devflow recover <id>`.
434
434
 
435
- Available commands in `0.3.4`:
435
+ Available commands in `0.3.5`:
436
436
 
437
437
  | Command | Status |
438
438
  | --- | --- |
@@ -493,6 +493,12 @@ devflow spec "Add a GET /patients endpoint"
493
493
  devflow spec --continue 006 . --harness opencode
494
494
  ```
495
495
 
496
+ When no `--harness` is passed, an interactive `devflow spec` asks which
497
+ installed harness to use before starting, even if `.devflow/config.yaml`
498
+ already names one. The configured harness is offered as the default.
499
+ Pass `--harness <name>` to skip the prompt, or `--no-agent` to use
500
+ deterministic static analysis.
501
+
496
502
  Use `--auto` to run both phases in a single invocation, as earlier
497
503
  releases did:
498
504
 
@@ -614,7 +620,7 @@ devflow approve 001 --stage spec
614
620
  ```
615
621
 
616
622
  Approval is explicit and binds the decision to the current artifact
617
- digests. For a `0.3.4` change it binds `spec.md`, `discovery.yaml` and,
623
+ digests. For a `0.3.5` change it binds `spec.md`, `discovery.yaml` and,
618
624
  when a manifest applies, the architecture manifest digest. Repeating the
619
625
  same approval is a no-op. If an artifact changes after validation,
620
626
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -625,7 +631,7 @@ and names the pending questions and assumptions. Approval also rejects a
625
631
  specification whose section 7 still lists open questions. Legacy `0.2.0`
626
632
  changes without `discovery.yaml` remain approvable with a warning.
627
633
 
628
- Only the `spec` stage is available in `0.3.4`. `--stage plan` and
634
+ Only the `spec` stage is available in `0.3.5`. `--stage plan` and
629
635
  `--stage review` are rejected. There are no `plan`, `implement` or
630
636
  `review` commands in this release.
631
637
 
@@ -1,5 +1,5 @@
1
1
  devflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- devflow/cli.py,sha256=yqUpivQYGuLvAOS_36XFTxOtIXj6kmGpaHugZaT6Xfc,1168
2
+ devflow/cli.py,sha256=9OwQoZ3n16VB1VlmJZK89Wo38QcKt-t1Bc6_asZtCMY,1168
3
3
  devflow/adapters/__init__.py,sha256=WcsjXQTKzHNzMAHx82-sdJQeR3ceHRVqLWTUtRlaraE,867
4
4
  devflow/adapters/agents.py,sha256=4d54hDfBgnIP4zOKcZqAG-Qa-jfuuxzFL-akZS2qYtw,1309
5
5
  devflow/adapters/base.py,sha256=YggY_IwHExdybl5S9NjwZSlmmcw9Y6z7DhQsl3JLvXs,2055
@@ -11,12 +11,12 @@ devflow/adapters/kiro.py,sha256=8l5y7ZYffg_T9eciM28NKGHil_zgdT96mAdYK4oBZ0U,6111
11
11
  devflow/adapters/opencode.py,sha256=DonmvAKyWK2v5-X2XrL0n2iptFp7qLgOlh-X8n_8I-w,6492
12
12
  devflow/adapters/registry.py,sha256=NLd_tf7dAiZUa6gbQFcwPogurZyjbMNbzjjXozAD4xs,1177
13
13
  devflow/commands/__init__.py,sha256=yOLtd_4R4xdlMgAzihzIT35oyV_qcz0br-aoLebRj1c,157
14
- devflow/commands/approve.py,sha256=KDjeyF8NZIMCdne4098QXc6uudboxVCAqauvaDMP2VE,2740
14
+ devflow/commands/approve.py,sha256=z9EN2yol3ZamXna8E60hlOLETCsD5YZ4Tvk9gE9p9xI,2740
15
15
  devflow/commands/doctor.py,sha256=vYk2i3OksbGpHEUFsqi7c4w44mAXRmY0OeEdO8h5j_M,4161
16
- devflow/commands/harness.py,sha256=r_RSAi7gXK8QNucC6eV-RzXHJycmmR03dzihqLVgdiU,2791
16
+ devflow/commands/harness.py,sha256=bm0TQ7abASHfa81JKZV5w6raWN7ezbzfNmUK_n75dsI,3765
17
17
  devflow/commands/init.py,sha256=B-rW-etZ-Rptt9YW43YZ5mN_l3gfGczuXW9kpmHDOWQ,15420
18
18
  devflow/commands/recover.py,sha256=sV9x5-30E_3XRBe7JItDiSG-pqrowRzjqOkC_eyrhFQ,2165
19
- devflow/commands/spec.py,sha256=B-hwDUX1zP_m0aMDGzGlj-AFYNNwIL4k4ICKz7rYoyI,15728
19
+ devflow/commands/spec.py,sha256=F3jm8fJCDAlObV1e7Jt0HZh_XudvmjL7EyVC27ble_8,15820
20
20
  devflow/commands/status.py,sha256=doFXRmK0Ys-oP-w-sd6cI33n1NoAEPtq4CJAtUstyHg,4423
21
21
  devflow/core/__init__.py,sha256=hN7i4-PDaZ7y4P8qRpZl_lJvIiPyQaN1TDGnw2BecYU,427
22
22
  devflow/core/architecture.py,sha256=qllllsUVqA76LiSU6z_s4U8dxMcs6ClKXU16HxI3yOI,13692
@@ -59,8 +59,8 @@ devflow/prompts/__init__.py,sha256=hdixkEhocz84S3-Vvx7Xmje03VordXE8jUtqGUZMqbs,8
59
59
  devflow/prompts/discovery.md,sha256=EGxzDYNoH_kOL3pptTkTG89SFB9-7f43Pfew4KrUDqc,6126
60
60
  devflow/prompts/spec.greenfield.md,sha256=BEKTN7G0B_P0bAevNeShzb_54dYu6j95_B3YqyhYK40,5154
61
61
  devflow/prompts/spec.md,sha256=zXrNA--c8IiQJBMyxidTtLVHUIrn7Ynj6935dyje1SY,3801
62
- devflow_toolkit-0.3.4.dist-info/METADATA,sha256=W7IIHKzktvTIqFQF8FjMhFhD478K4oskR-0qICYRZp8,27192
63
- devflow_toolkit-0.3.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
64
- devflow_toolkit-0.3.4.dist-info/entry_points.txt,sha256=wPmqE1081vi8s3xf-Wfzfvpl-44IKgwx7OGoLEK3u7o,44
65
- devflow_toolkit-0.3.4.dist-info/licenses/LICENSE,sha256=Wa04lstC8Goe4b9IYfEYWB2k7nokYBejZl6NdyAl8rA,1077
66
- devflow_toolkit-0.3.4.dist-info/RECORD,,
62
+ devflow_toolkit-0.3.5.dist-info/METADATA,sha256=rtoXsuSziZTJUk3mB7F1x7q0rXo4AbdhqtZ_PQkVYiI,27505
63
+ devflow_toolkit-0.3.5.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
64
+ devflow_toolkit-0.3.5.dist-info/entry_points.txt,sha256=wPmqE1081vi8s3xf-Wfzfvpl-44IKgwx7OGoLEK3u7o,44
65
+ devflow_toolkit-0.3.5.dist-info/licenses/LICENSE,sha256=Wa04lstC8Goe4b9IYfEYWB2k7nokYBejZl6NdyAl8rA,1077
66
+ devflow_toolkit-0.3.5.dist-info/RECORD,,