devflow-toolkit 0.3.8__py3-none-any.whl → 0.3.10__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.8"
38
+ current_version = "0.3.10"
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.8. "
60
+ f"Stage '{stage}' is not available in DevFlow 0.3.10. "
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 = [
@@ -310,6 +310,9 @@ class SpecWorkflow:
310
310
  discovery_manager=discovery_manager,
311
311
  adapter=adapter,
312
312
  execution_mode=request.execution_mode,
313
+ language=(
314
+ request.language or config.documentation_language
315
+ ),
313
316
  config=config,
314
317
  project=project,
315
318
  constitution=constitution,
@@ -686,6 +689,7 @@ class SpecWorkflow:
686
689
  discovery_manager: DiscoveryManager,
687
690
  adapter: HarnessPort,
688
691
  execution_mode: str,
692
+ language: str,
689
693
  config: DevFlowConfig,
690
694
  project: Project,
691
695
  constitution: Constitution,
@@ -707,6 +711,7 @@ class SpecWorkflow:
707
711
  harness_name=adapter.display_name,
708
712
  execution_mode=execution_mode,
709
713
  permissions=config.permissions,
714
+ language=language,
710
715
  )
711
716
  run_context = RunContext(
712
717
  root=config.root,
@@ -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,
@@ -102,6 +102,7 @@ def build_discovery_prompt(
102
102
  harness_name: str,
103
103
  execution_mode: str,
104
104
  permissions: AgentPermissions,
105
+ language: str = "en",
105
106
  ) -> str:
106
107
  """Render the interactive discovery prompt for any harness."""
107
108
  template = load_prompt("discovery.md")
@@ -112,6 +113,7 @@ def build_discovery_prompt(
112
113
  "discovery_path": discovery_path,
113
114
  "harness_name": harness_name,
114
115
  "execution_mode": execution_mode,
116
+ "language_note": _discovery_language_note(language),
115
117
  "mode_instructions": _discovery_mode_instructions(
116
118
  discovery_path,
117
119
  execution_mode,
@@ -139,6 +141,22 @@ def _language_note(language: str) -> str:
139
141
  )
140
142
 
141
143
 
144
+ def _discovery_language_note(language: str) -> str:
145
+ """Return the prompt instruction that selects the conversation language."""
146
+ target = (language or "en").strip() or "en"
147
+ return (
148
+ f"Speak to the user and write every new discovery question, reason, "
149
+ f"option, assumption and report in the language identified as "
150
+ f"`{target}`.\n\n"
151
+ "The existing discovery record may contain question text in another "
152
+ "language. Preserve its ids, categories, blocking flags and stored "
153
+ "question text exactly, but translate each question accurately into "
154
+ "the target language when you ask it in conversation. Keep paths, "
155
+ "field names, category identifiers, `Qn`/`An` identifiers, commands "
156
+ "and digests exactly as shown."
157
+ )
158
+
159
+
142
160
  def _discovery_mode_instructions(
143
161
  discovery_path: str,
144
162
  execution_mode: str,
@@ -10,6 +10,10 @@ You are the discovery agent for the project `{{project_name}}`.
10
10
  - Harness: {{harness_name}}
11
11
  - Execution mode: {{execution_mode}}
12
12
 
13
+ ## Language
14
+
15
+ {{language_note}}
16
+
13
17
  Read the context and the discovery record before talking to the user.
14
18
  The discovery record is the only place where answers and assumption
15
19
  acceptance may be recorded.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.8
3
+ Version: 0.3.10
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.8` MVP. It implements the **discovery and
45
+ This is the `0.3.10` 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.8-py3-none-any.whl
121
+ pip install devflow_toolkit-0.3.10-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.8 |
300
+ | Harness | Status in 0.3.10 |
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 |
@@ -397,6 +403,12 @@ Every question, blocking or not, must be answered before
397
403
  `discovery.yaml` can be `complete` and before a specification can be
398
404
  generated.
399
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
+
400
412
  For user-generated content, Discovery must also resolve who writes it,
401
413
  who may create, edit or delete it, moderation, authentication
402
414
  mechanism, validation, ordering, lifecycle on parent deletion, admin
@@ -456,7 +468,7 @@ specification that still lists open questions.
456
468
  8. If artifacts exist without workflow state, diagnose with
457
469
  `devflow doctor <id>` and repair with `devflow recover <id>`.
458
470
 
459
- Available commands in `0.3.8`:
471
+ Available commands in `0.3.10`:
460
472
 
461
473
  | Command | Status |
462
474
  | --- | --- |
@@ -566,9 +578,12 @@ run in the same invocation. Without it, an interactive run stops at the
566
578
  Discovery checkpoint.
567
579
 
568
580
  `spec --language <code>` overrides the configured language for that run
569
- without changing `.devflow/config.yaml`. The deterministic `--no-agent`
570
- draft remains in English; the language setting applies to specifications
571
- written by an agent.
581
+ without changing `.devflow/config.yaml`. Interactive agent Discovery
582
+ asks existing questions and writes new questions in that language, even
583
+ when the stored question text was generated in English by the
584
+ deterministic planner. Specifications written by an agent use the same
585
+ language. The deterministic `--no-agent` planner still writes its own
586
+ stored question text in English.
572
587
 
573
588
  If the harness is unavailable, fails, or returns an invalid document,
574
589
  DevFlow writes a deterministic draft and reports the reason. The command
@@ -644,7 +659,7 @@ devflow approve 001 --stage spec
644
659
  ```
645
660
 
646
661
  Approval is explicit and binds the decision to the current artifact
647
- digests. For a `0.3.8` change it binds `spec.md`, `discovery.yaml` and,
662
+ digests. For a `0.3.10` change it binds `spec.md`, `discovery.yaml` and,
648
663
  when a manifest applies, the architecture manifest digest. Repeating the
649
664
  same approval is a no-op. If an artifact changes after validation,
650
665
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -655,7 +670,7 @@ and names the pending questions and assumptions. Approval also rejects a
655
670
  specification whose section 7 still lists open questions. Legacy `0.2.0`
656
671
  changes without `discovery.yaml` remain approvable with a warning.
657
672
 
658
- Only the `spec` stage is available in `0.3.8`. `--stage plan` and
673
+ Only the `spec` stage is available in `0.3.10`. `--stage plan` and
659
674
  `--stage review` are rejected. There are no `plan`, `implement` or
660
675
  `review` commands in this release.
661
676
 
@@ -679,7 +694,6 @@ my-project/
679
694
  │ ├── spec.md # only when Discovery is complete
680
695
  │ ├── workflow.yaml # projection of events.jsonl
681
696
  │ ├── events.jsonl # append-only source of truth
682
- │ ├── runs/ # agent run metadata
683
697
  │ └── .lock # per-change advisory lock
684
698
  ├── AGENTS.md
685
699
  ├── opencode.json # when OpenCode is selected
@@ -1,5 +1,5 @@
1
1
  devflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- devflow/cli.py,sha256=_kWGlgV8GWXP5cv9tIabQZbqVZIhfC_YLPrPt3e5u9M,1168
2
+ devflow/cli.py,sha256=HXnydHRP2HErG4NaGdYxoTv_6z0lSwtwyu5tO0WlyLI,1169
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
@@ -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=P-ptdJ4Iue2ryb7iPmHEHs_ydLdrJcYCF4Er4_1Zj4k,2740
14
+ devflow/commands/approve.py,sha256=N29_FIVY5_Rw4TuUj5-tMg0L1g2P6fl9bShVmWbwtuc,2741
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,12 +23,12 @@ 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
30
30
  devflow/core/recovery.py,sha256=W2If6Ymb3ISwMN8IVQYCwptDUzhxejlF-P2NvMYyZP0,8818
31
- devflow/core/spec_workflow.py,sha256=_GTCMewFo-Vf3XPQPRFB6YnWUqH1Menj2W9EWsXuf1A,32660
31
+ devflow/core/spec_workflow.py,sha256=FduVkHiS_6dlqV4wiOO9yTtuCZSSnDlRUUlzxt9dy1Q,32800
32
32
  devflow/core/specification.py,sha256=vVlhHCdBFlnuIfA_IJPxY4sa0S0t6oX27cn_nFyevGM,65399
33
33
  devflow/core/artifacts/__init__.py,sha256=gt9xahPynoxv75FMq1ZJx91ILTIv4ExuvX1Ymrxwr2c,627
34
34
  devflow/core/artifacts/errors.py,sha256=hwZxnLFcUTtEjDWtN6rUCkM69EN19LGVlc6HD-pNZyk,493
@@ -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
@@ -55,12 +55,12 @@ devflow/profiles/django-backend/profile.yaml,sha256=SNj7a3yamdJx-P69GvIJmLkC2svO
55
55
  devflow/profiles/django-backend/constitution/django-standards.md,sha256=0M-XmxOpEmgIadcaVdf6OVmll8Oec0jEjcJ4C8MfwhQ,2052
56
56
  devflow/profiles/fastapi-backend/profile.yaml,sha256=5_b-zWSX0HV-tw_2ntRCSa4DyP3NUqYWmxOh55pXYmc,321
57
57
  devflow/profiles/fastapi-backend/constitution/fastapi-standards.md,sha256=iFKib4i_9z4wBQ9thl-uftg5g-CHwvmFWzMtLgA7CBk,1949
58
- devflow/prompts/__init__.py,sha256=hdixkEhocz84S3-Vvx7Xmje03VordXE8jUtqGUZMqbs,8332
59
- devflow/prompts/discovery.md,sha256=EGxzDYNoH_kOL3pptTkTG89SFB9-7f43Pfew4KrUDqc,6126
58
+ devflow/prompts/__init__.py,sha256=_drXcHz2EWOplP-Nk3eq-F7QYKZdxc6HjZI_XB8Wvxg,9174
59
+ devflow/prompts/discovery.md,sha256=1XA-xMSBFhRbnZVWUV-9UOQetwqlA2lXM4FQ7i2YNhg,6158
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.8.dist-info/METADATA,sha256=MeE8TckImACj_AIglMElu0CZOLkGfFU6_m8ZENpJFx4,28749
63
- devflow_toolkit-0.3.8.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
64
- devflow_toolkit-0.3.8.dist-info/entry_points.txt,sha256=wPmqE1081vi8s3xf-Wfzfvpl-44IKgwx7OGoLEK3u7o,44
65
- devflow_toolkit-0.3.8.dist-info/licenses/LICENSE,sha256=Wa04lstC8Goe4b9IYfEYWB2k7nokYBejZl6NdyAl8rA,1077
66
- devflow_toolkit-0.3.8.dist-info/RECORD,,
62
+ devflow_toolkit-0.3.10.dist-info/METADATA,sha256=zJrALR56fuOV7UDky6Ta2PH2uteSbPlyqqvOLFlY-qE,29527
63
+ devflow_toolkit-0.3.10.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
64
+ devflow_toolkit-0.3.10.dist-info/entry_points.txt,sha256=wPmqE1081vi8s3xf-Wfzfvpl-44IKgwx7OGoLEK3u7o,44
65
+ devflow_toolkit-0.3.10.dist-info/licenses/LICENSE,sha256=Wa04lstC8Goe4b9IYfEYWB2k7nokYBejZl6NdyAl8rA,1077
66
+ devflow_toolkit-0.3.10.dist-info/RECORD,,