devflow-toolkit 0.3.7__py3-none-any.whl → 0.3.9__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.
@@ -56,14 +56,15 @@ class ClaudeCodeAdapter(HarnessAdapter):
56
56
  separators=(",", ":"),
57
57
  )
58
58
  root = context.root
59
+ permission_mode = (
60
+ "manual" if context.mode == "interactive" else "dontAsk"
61
+ )
59
62
 
60
63
  if context.mode == "interactive":
61
64
  argv = (
62
65
  self.executable,
63
66
  "--permission-mode",
64
- "dontAsk",
65
- "--allowedTools",
66
- "AskUserQuestion",
67
+ permission_mode,
67
68
  "--settings",
68
69
  settings,
69
70
  context.prompt,
@@ -79,7 +80,7 @@ class ClaudeCodeAdapter(HarnessAdapter):
79
80
  "--output-format",
80
81
  "text",
81
82
  "--permission-mode",
82
- "dontAsk",
83
+ permission_mode,
83
84
  "--tools",
84
85
  ",".join(tools),
85
86
  "--settings",
@@ -118,15 +119,15 @@ class ClaudeCodeAdapter(HarnessAdapter):
118
119
  if context.permissions.allow_project_read:
119
120
  allow.extend(["Read", "Grep", "Glob"])
120
121
 
121
- if context.mode == "interactive":
122
- # Discovery needs to ask the user directly. ``dontAsk`` denies
123
- # every prompt unless the tool is explicitly allowed.
124
- allow.append("AskUserQuestion")
125
-
126
122
  if context.permissions.allow_source_code_changes:
127
- allow.extend(["Edit", "Bash"])
123
+ allow.extend(["Edit", "Write", "Bash"])
128
124
  elif context.permissions.allow_spec_write:
129
- allow.append("Edit(.devflow/specs/**)")
125
+ allow.extend(
126
+ [
127
+ "Edit(.devflow/specs/**)",
128
+ "Write(.devflow/specs/**)",
129
+ ]
130
+ )
130
131
 
131
132
  deny.extend(["WebFetch", "WebSearch", "Task"])
132
133
  if not context.permissions.allow_source_code_changes:
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.7"
38
+ current_version = "0.3.9"
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.7. "
60
+ f"Stage '{stage}' is not available in DevFlow 0.3.9. "
61
61
  "Only the 'spec' stage can be approved."
62
62
  )
63
63
  raise UnsupportedStageError(msg)
@@ -53,10 +53,12 @@ def resolve_harness(
53
53
  if force_prompt and allow_prompt:
54
54
  names = [harness.name for harness in detected]
55
55
  if not names:
56
- return None, [
57
- "No supported agent harness was found on PATH. DevFlow will use "
58
- "deterministic static analysis.",
59
- ]
56
+ msg = (
57
+ "No supported agent harness was found on PATH. Install a harness "
58
+ "(codex, opencode, claude-code or kiro) or pass --harness none / "
59
+ "--no-agent to use deterministic static analysis explicitly."
60
+ )
61
+ raise ConfigError(msg)
60
62
  default = canonical if canonical in names else names[0]
61
63
  chosen = _prompt_for_harness(
62
64
  names,
devflow/core/discovery.py CHANGED
@@ -114,13 +114,23 @@ _VAGUE_TERMS = {
114
114
  "soporte",
115
115
  }
116
116
 
117
- _CONTACT_WORDS = {"contact", "contacto", "contactenos"}
117
+ _CONTACT_WORDS = {
118
+ "contact",
119
+ "contacto",
120
+ "contactos",
121
+ "contacts",
122
+ "contactenos",
123
+ }
118
124
  _FORM_WORDS = {"form", "formulario"}
119
125
  _PAGE_WORDS = {
120
126
  "page",
121
127
  "pagina",
122
- "template",
128
+ "pantalla",
123
129
  "plantilla",
130
+ "screen",
131
+ "seccion",
132
+ "section",
133
+ "template",
124
134
  "view",
125
135
  "vista",
126
136
  }
@@ -385,6 +395,23 @@ _ARCHITECTURE_WORDS = {
385
395
  "refactor",
386
396
  }
387
397
 
398
+ # Vocabulary the planner understands well enough to decide that a request
399
+ # does not need a generic scope question. When a request contains none of
400
+ # these signals, a deterministic run must not silently declare Discovery
401
+ # complete just because no heuristic matched.
402
+ _PLANNER_SIGNAL_WORDS = (
403
+ _CONTACT_WORDS
404
+ | _FORM_WORDS
405
+ | _PAGE_WORDS
406
+ | _AUTH_WORDS
407
+ | _AUTH_INTEGRATION_WORDS
408
+ | _DATA_WORDS
409
+ | _COMMENT_WORDS
410
+ | _DEPLOYMENT_WORDS
411
+ | _ARCHITECTURE_WORDS
412
+ | _VAGUE_TERMS
413
+ )
414
+
388
415
 
389
416
  class DiscoveryError(Exception):
390
417
  """Raised when discovery data is missing or malformed."""
@@ -1497,6 +1524,26 @@ class DiscoveryPlanner:
1497
1524
  ),
1498
1525
  )
1499
1526
 
1527
+ if (
1528
+ not questions
1529
+ and len(keywords) < 6
1530
+ and not (words & _PLANNER_SIGNAL_WORDS)
1531
+ ):
1532
+ add_question(
1533
+ "functional_scope",
1534
+ "What exact user-visible behavior should this change add, and "
1535
+ "how should it be verified?",
1536
+ "The request is short and does not match a known feature "
1537
+ "pattern, so DevFlow cannot confirm the scope, the expected "
1538
+ "behavior or the acceptance criteria without an explicit "
1539
+ "decision.",
1540
+ (
1541
+ "Describe the intended behavior and acceptance criteria.",
1542
+ "Reuse an existing feature (describe it).",
1543
+ "Other (describe).",
1544
+ ),
1545
+ )
1546
+
1500
1547
  questions = questions[:10]
1501
1548
  question_ids = {question.id for question in questions}
1502
1549
  assumptions = [
@@ -195,7 +195,6 @@ class WorkflowStateManager:
195
195
  change: str | None = None,
196
196
  ) -> WorkflowState:
197
197
  location.directory.mkdir(parents=True, exist_ok=True)
198
- location.runs_path.mkdir(parents=True, exist_ok=True)
199
198
  state = WorkflowState(
200
199
  spec_id=spec_id or location.spec_id,
201
200
  change=change or location.change,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.7
3
+ Version: 0.3.9
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.7` MVP. It implements the **discovery and
45
+ This is the `0.3.9` 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.7-py3-none-any.whl
121
+ pip install devflow_toolkit-0.3.9-py3-none-any.whl
122
122
  ```
123
123
 
124
124
  Verify the installation:
@@ -183,6 +183,12 @@ If an explicitly selected harness is not installed, `init` still records
183
183
  the selection but prints a warning. Subsequent `spec` runs fall back to
184
184
  deterministic static analysis until the executable is available.
185
185
 
186
+ When an interactive `spec` run asks you to choose a harness and none of
187
+ the supported executables is installed, the command fails with a clear
188
+ error instead of silently switching to deterministic analysis. Pass
189
+ `--harness none` or `--no-agent` to opt into deterministic output
190
+ explicitly.
191
+
186
192
  ## Configuration
187
193
 
188
194
  `.devflow/config.yaml` stores project settings. It references the
@@ -291,7 +297,7 @@ as an architectural constraint when it is present.
291
297
 
292
298
  ### Harnesses
293
299
 
294
- | Harness | Status in 0.3.7 |
300
+ | Harness | Status in 0.3.9 |
295
301
  | --- | --- |
296
302
  | OpenCode | Verified end-to-end in non-interactive mode |
297
303
  | Codex | Integration files are generated, but not verified for this release |
@@ -340,10 +346,12 @@ not treated as the only permission boundary.
340
346
  When a harness cannot enforce a restriction technically, DevFlow prints
341
347
  a warning instead of claiming that the restriction is guaranteed.
342
348
 
343
- For Claude Code, interactive runs explicitly allow the
344
- `AskUserQuestion` tool even though the adapter uses `dontAsk` mode, so
345
- Discovery can ask the user directly. Non-interactive runs do not allow
346
- the tool.
349
+ For Claude Code, interactive runs use Manual mode
350
+ (`--permission-mode manual`) so Discovery can open the
351
+ `AskUserQuestion` dialog. Reads and writes under `.devflow/specs/` are
352
+ pre-approved, while shell, web and task tools remain denied.
353
+ Non-interactive runs keep the locked `dontAsk` mode and do not allow the
354
+ question tool.
347
355
 
348
356
  ## Discovery
349
357
 
@@ -395,6 +403,12 @@ Every question, blocking or not, must be answered before
395
403
  `discovery.yaml` can be `complete` and before a specification can be
396
404
  generated.
397
405
 
406
+ The deterministic planner recognizes contact pages, forms, comments,
407
+ authentication, persistence, deployments and architecture boundaries in
408
+ English and Spanish. If a short request does not match any known feature
409
+ vocabulary, the planner adds a generic blocking scope question instead
410
+ of marking Discovery complete with no questions.
411
+
398
412
  For user-generated content, Discovery must also resolve who writes it,
399
413
  who may create, edit or delete it, moderation, authentication
400
414
  mechanism, validation, ordering, lifecycle on parent deletion, admin
@@ -454,7 +468,7 @@ specification that still lists open questions.
454
468
  8. If artifacts exist without workflow state, diagnose with
455
469
  `devflow doctor <id>` and repair with `devflow recover <id>`.
456
470
 
457
- Available commands in `0.3.7`:
471
+ Available commands in `0.3.9`:
458
472
 
459
473
  | Command | Status |
460
474
  | --- | --- |
@@ -642,7 +656,7 @@ devflow approve 001 --stage spec
642
656
  ```
643
657
 
644
658
  Approval is explicit and binds the decision to the current artifact
645
- digests. For a `0.3.7` change it binds `spec.md`, `discovery.yaml` and,
659
+ digests. For a `0.3.9` change it binds `spec.md`, `discovery.yaml` and,
646
660
  when a manifest applies, the architecture manifest digest. Repeating the
647
661
  same approval is a no-op. If an artifact changes after validation,
648
662
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -653,7 +667,7 @@ and names the pending questions and assumptions. Approval also rejects a
653
667
  specification whose section 7 still lists open questions. Legacy `0.2.0`
654
668
  changes without `discovery.yaml` remain approvable with a warning.
655
669
 
656
- Only the `spec` stage is available in `0.3.7`. `--stage plan` and
670
+ Only the `spec` stage is available in `0.3.9`. `--stage plan` and
657
671
  `--stage review` are rejected. There are no `plan`, `implement` or
658
672
  `review` commands in this release.
659
673
 
@@ -677,7 +691,6 @@ my-project/
677
691
  │ ├── spec.md # only when Discovery is complete
678
692
  │ ├── workflow.yaml # projection of events.jsonl
679
693
  │ ├── events.jsonl # append-only source of truth
680
- │ ├── runs/ # agent run metadata
681
694
  │ └── .lock # per-change advisory lock
682
695
  ├── AGENTS.md
683
696
  ├── opencode.json # when OpenCode is selected
@@ -1,9 +1,9 @@
1
1
  devflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- devflow/cli.py,sha256=-J_7Tnc6wzNiwBnoaz1XrUSUIWLJUBh6kyDMhsopBNE,1168
2
+ devflow/cli.py,sha256=SyUztLDKPlKMhMkznTddACxxtidqU2c-mNxVm2VTvB0,1168
3
3
  devflow/adapters/__init__.py,sha256=WcsjXQTKzHNzMAHx82-sdJQeR3ceHRVqLWTUtRlaraE,867
4
4
  devflow/adapters/agents.py,sha256=OZnz7wAJNcIojtgaQIK1iB6QKWGgv2VCmoBp8M9DUKE,1423
5
5
  devflow/adapters/base.py,sha256=YggY_IwHExdybl5S9NjwZSlmmcw9Y6z7DhQsl3JLvXs,2055
6
- devflow/adapters/claude_code.py,sha256=V7Hsog9CRPvA50jhBoI3KvTy0xehCt-vUFi7jWhDPc4,3663
6
+ devflow/adapters/claude_code.py,sha256=nJ-J4nwlql6751GYoSX8LbR3zPmdMTut7prZ-6ABzE8,3595
7
7
  devflow/adapters/codex.py,sha256=ctMQi-qvumkQxCNdiD9d25bDQoxarMl_-9GfBsYxoyQ,3290
8
8
  devflow/adapters/detector.py,sha256=92BkNAvWs2Vh8H6xJzMweBDCw6yuYVg7sV4LoSZ8KFo,3291
9
9
  devflow/adapters/instructions.py,sha256=ukkPhI2FFZPqERg6PFFyP05BPifrpDHzw082b7D-Teo,10222
@@ -11,9 +11,9 @@ devflow/adapters/kiro.py,sha256=VxAcwkAdkTbZjDjTJaZfs4kyVHSwR4_Wo3GmFsbmEBU,6754
11
11
  devflow/adapters/opencode.py,sha256=tAsLApXFSUU2-fPgE8wXtgF7OAOA_qYrVJVeS-GiJ3E,7077
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=W-IYx2RTDZQfqHrVcC40hXyAusD6mKR2IJaSVUR-m-o,2740
14
+ devflow/commands/approve.py,sha256=v3G9yWyKU8essKrmj4TtaXf3vqnWK2-ThP68azZ5W_4,2740
15
15
  devflow/commands/doctor.py,sha256=vYk2i3OksbGpHEUFsqi7c4w44mAXRmY0OeEdO8h5j_M,4161
16
- devflow/commands/harness.py,sha256=bm0TQ7abASHfa81JKZV5w6raWN7ezbzfNmUK_n75dsI,3765
16
+ devflow/commands/harness.py,sha256=-Tas6OvkM46zRhBEcJokQkrbKixP4y-haabkI-JmQXM,3891
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
19
  devflow/commands/spec.py,sha256=F3jm8fJCDAlObV1e7Jt0HZh_XudvmjL7EyVC27ble_8,15820
@@ -23,7 +23,7 @@ devflow/core/architecture.py,sha256=qllllsUVqA76LiSU6z_s4U8dxMcs6ClKXU16HxI3yOI,
23
23
  devflow/core/clock.py,sha256=KZROv6o51Ln1EzK00ySCxfc7WPZqPlaQhFfjfdc_TMY,1651
24
24
  devflow/core/config.py,sha256=Ft37K1r6zm3QsU6YtuqBjq2Yr9sDscC5QiqAUrsHpUw,22108
25
25
  devflow/core/constitution.py,sha256=nPHyy7BuIyyqkn4y85UyWn2E7f5AWHbg4iZ0frF9SfE,4581
26
- devflow/core/discovery.py,sha256=ed0gScDUbic4YEY-1XQzc2kVlQ6-lcLXWloubyFX7dc,44204
26
+ devflow/core/discovery.py,sha256=yIHnuwJGhYBpRm8KA2u6RPCi0gPBLh6boO7j_HN370I,45458
27
27
  devflow/core/ports.py,sha256=R6ybjAdJEdtTKFc4FMFTX0TVwRfDwPoWCsu-BHrhI5A,4071
28
28
  devflow/core/profile_manager.py,sha256=QnnJka2KIKD2tCSWJkGTOUEFMgmQT0Z9Qv173JKWKHw,8937
29
29
  devflow/core/project.py,sha256=aXJanCK-TjkDy4v_XM14Xj3z7sbHPusjyJrIzmDqeAI,16989
@@ -39,7 +39,7 @@ devflow/core/state/errors.py,sha256=dgF-x4TCxQTXc1OifyT8UZSU-0PBhATjO1x6OTMagac,
39
39
  devflow/core/state/events.py,sha256=IfwFCC0jbrQsH1tzADyqwm8HtWo5fR7QDD85M6JH8N0,20698
40
40
  devflow/core/state/locator.py,sha256=J6ZnVzcY_KzwKqBXbAOnfG9FrRzSCaYMqFeMQ7ptjIc,3256
41
41
  devflow/core/state/lock.py,sha256=94llvwHtCc5WOw-Uq8kDCu4iOBpRM4ccp6Q6fLZpYZ0,2089
42
- devflow/core/state/manager.py,sha256=_KI88ZEvw2f9t0GD3N620B3I-4sWeeLC4UL5oV1sezU,28984
42
+ devflow/core/state/manager.py,sha256=YDe6-H-tg7iYLCFP24R1_queoRNJnQbeqO5oe_M6eLQ,28926
43
43
  devflow/core/state/models.py,sha256=4GTrS34ymbJIyBeZkcCi0z0e1bsq67vdxRSnSQ9O3gc,4654
44
44
  devflow/core/state/transitions.py,sha256=Go0zLhxcujWhaZEGg7JMqcC_UJU_nEFEBbpKIqrCtrs,3581
45
45
  devflow/models/__init__.py,sha256=hXX3IDZbHgklmuzVVlpiRs5SSPnrkO5kN1-k2hIEk7E,156
@@ -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.7.dist-info/METADATA,sha256=baMOOZD-gKXN5ypN49ScJYwP39e9YGrFW5_Nv3QLCXw,28631
63
- devflow_toolkit-0.3.7.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
64
- devflow_toolkit-0.3.7.dist-info/entry_points.txt,sha256=wPmqE1081vi8s3xf-Wfzfvpl-44IKgwx7OGoLEK3u7o,44
65
- devflow_toolkit-0.3.7.dist-info/licenses/LICENSE,sha256=Wa04lstC8Goe4b9IYfEYWB2k7nokYBejZl6NdyAl8rA,1077
66
- devflow_toolkit-0.3.7.dist-info/RECORD,,
62
+ devflow_toolkit-0.3.9.dist-info/METADATA,sha256=QkhqEsuwuEv7TIOTak8glJgdKj5L7KD1YIP8OVjdlcw,29309
63
+ devflow_toolkit-0.3.9.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
64
+ devflow_toolkit-0.3.9.dist-info/entry_points.txt,sha256=wPmqE1081vi8s3xf-Wfzfvpl-44IKgwx7OGoLEK3u7o,44
65
+ devflow_toolkit-0.3.9.dist-info/licenses/LICENSE,sha256=Wa04lstC8Goe4b9IYfEYWB2k7nokYBejZl6NdyAl8rA,1077
66
+ devflow_toolkit-0.3.9.dist-info/RECORD,,