devflow-toolkit 0.3.3__tar.gz → 0.3.4__tar.gz

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 (77) hide show
  1. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/CHANGELOG.md +24 -0
  2. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/PKG-INFO +52 -30
  3. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/README.md +51 -29
  4. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/pyproject.toml +1 -1
  5. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/cli.py +1 -1
  6. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/approve.py +1 -1
  7. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/spec.py +3 -3
  8. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/status.py +1 -0
  9. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/discovery.py +317 -26
  10. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/spec_workflow.py +115 -12
  11. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/specification.py +9 -25
  12. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/manager.py +23 -0
  13. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/prompts/__init__.py +34 -17
  14. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/prompts/discovery.md +58 -9
  15. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/prompts/spec.greenfield.md +13 -7
  16. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/prompts/spec.md +12 -6
  17. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_cli.py +1 -1
  18. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_discovery.py +97 -8
  19. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_harness_adapters.py +1 -1
  20. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_spec_workflow.py +36 -1
  21. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/.gitignore +0 -0
  22. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/LICENSE +0 -0
  23. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/__init__.py +0 -0
  24. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/__init__.py +0 -0
  25. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/agents.py +0 -0
  26. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/base.py +0 -0
  27. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/claude_code.py +0 -0
  28. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/codex.py +0 -0
  29. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/detector.py +0 -0
  30. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/instructions.py +0 -0
  31. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/kiro.py +0 -0
  32. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/opencode.py +0 -0
  33. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/adapters/registry.py +0 -0
  34. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/__init__.py +0 -0
  35. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/doctor.py +0 -0
  36. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/harness.py +0 -0
  37. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/init.py +0 -0
  38. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/commands/recover.py +0 -0
  39. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/__init__.py +0 -0
  40. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/architecture.py +0 -0
  41. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/artifacts/__init__.py +0 -0
  42. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/artifacts/errors.py +0 -0
  43. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/artifacts/models.py +0 -0
  44. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/artifacts/store.py +0 -0
  45. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/clock.py +0 -0
  46. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/config.py +0 -0
  47. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/constitution.py +0 -0
  48. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/ports.py +0 -0
  49. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/profile_manager.py +0 -0
  50. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/project.py +0 -0
  51. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/recovery.py +0 -0
  52. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/__init__.py +0 -0
  53. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/errors.py +0 -0
  54. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/events.py +0 -0
  55. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/locator.py +0 -0
  56. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/lock.py +0 -0
  57. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/models.py +0 -0
  58. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/core/state/transitions.py +0 -0
  59. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/models/__init__.py +0 -0
  60. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/models/profile.py +0 -0
  61. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/models/project.py +0 -0
  62. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
  63. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
  64. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/base/constitution/architecture.md +0 -0
  65. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
  66. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/base/constitution/constitution.md +0 -0
  67. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/base/profile.yaml +0 -0
  68. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
  69. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/django-backend/profile.yaml +0 -0
  70. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
  71. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
  72. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_event_log.py +0 -0
  73. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_greenfield.py +0 -0
  74. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_hardening.py +0 -0
  75. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_recovery.py +0 -0
  76. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_state.py +0 -0
  77. {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.4}/tests/test_state_replay.py +0 -0
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to DevFlow Toolkit are documented in this file.
4
4
 
5
+ ## 0.3.4 - 2026-11-04
6
+
7
+ ### Changed
8
+
9
+ - Discovery is now strict: every question must be answered, including
10
+ questions marked `blocking: false`, and every proposed assumption
11
+ must be accepted before a specification is generated or approved.
12
+ `blocking` only prioritizes the conversation.
13
+ - Discovery now covers interpretation, authentication and
14
+ authorization, moderation, data lifecycle, validation, ordering,
15
+ administration, compatibility and out-of-scope decisions. The
16
+ discovery prompt and the deterministic planner add these questions
17
+ for user-generated content such as comments.
18
+ - `spec.md` is valid only when section 7 is exactly `None.`. When the
19
+ specification agent finds an unanswered decision, DevFlow archives
20
+ the generated document, appends the question to `discovery.yaml`
21
+ with a new `Qn` identifier, and returns the change to
22
+ `awaiting_clarification` instead of accepting the question in the
23
+ specification.
24
+ - `devflow approve --stage spec` rejects a specification whose section
25
+ 7 still lists open questions.
26
+ - Legacy changes without `discovery.yaml` keep their previous behavior.
27
+ - Package version is `0.3.4`.
28
+
5
29
  ## 0.3.3 - 2026-11-04
6
30
 
7
31
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Specification workflow toolkit for AI-assisted software changes
5
5
  Author: DevFlow contributors
6
6
  License-Expression: MIT
@@ -42,17 +42,21 @@ 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.3` MVP. It implements the **discovery and
45
+ This is the `0.3.4` 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
49
49
  review workflows.
50
50
 
51
51
  Discovery decides whether a request is ready to become a
52
- specification. A specification is only generated when every blocking
53
- question has an explicit answer and every proposed assumption has been
52
+ specification. A specification is only generated when every question
53
+ has an explicit answer and every proposed assumption has been
54
54
  explicitly accepted. Discovery is persisted, so an incomplete request
55
- can be resumed across sessions and agent harnesses.
55
+ can be resumed across sessions and agent harnesses. Discovery is also
56
+ the requirement-gathering stage: ambiguity, authentication,
57
+ permissions, moderation, data lifecycle, validation, ordering,
58
+ administration, compatibility and out-of-scope decisions must be
59
+ resolved there, not in `spec.md`.
56
60
 
57
61
  ## The problem it solves
58
62
 
@@ -114,7 +118,7 @@ pip install devflow-toolkit
114
118
  To install a specific built artifact instead:
115
119
 
116
120
  ```bash
117
- pip install devflow_toolkit-0.3.3-py3-none-any.whl
121
+ pip install devflow_toolkit-0.3.4-py3-none-any.whl
118
122
  ```
119
123
 
120
124
  Verify the installation:
@@ -278,7 +282,7 @@ as an architectural constraint when it is present.
278
282
 
279
283
  ### Harnesses
280
284
 
281
- | Harness | Status in 0.3.3 |
285
+ | Harness | Status in 0.3.4 |
282
286
  | --- | --- |
283
287
  | OpenCode | Verified end-to-end in non-interactive mode |
284
288
  | Codex | Integration files are generated, but not verified for this release |
@@ -361,18 +365,25 @@ assumptions:
361
365
  ```
362
366
 
363
367
  Each question has a `category` and an explicit `blocking` flag. The
364
- blocking categories are scope, user-visible behaviour, data and
365
- persistence, security and authentication, external integrations,
366
- architecture boundaries, new dependencies and deployment. A question
367
- may remain pending when it is genuinely non-blocking; it does not
368
- prevent specification generation.
368
+ categories are scope, user-visible behaviour, data and persistence,
369
+ security and authentication, external integrations, architecture
370
+ boundaries, new dependencies and deployment. The `blocking` flag
371
+ prioritizes the conversation; it does not make a question optional.
372
+ Every question, blocking or not, must be answered before
373
+ `discovery.yaml` can be `complete` and before a specification can be
374
+ generated.
375
+
376
+ For user-generated content, Discovery must also resolve who writes it,
377
+ who may create, edit or delete it, moderation, authentication
378
+ mechanism, validation, ordering, lifecycle on parent deletion, admin
379
+ registration, compatibility and explicit out-of-scope items.
369
380
 
370
381
  An assumption proposed by DevFlow uses `source: agent_default` and
371
382
  starts as `pending_acceptance`. It never becomes accepted automatically.
372
383
  A human must set `status: accepted` with `accepted_by` and `accepted_at`,
373
384
  or reject it and record a different decision.
374
385
 
375
- While blocking decisions remain:
386
+ While any question or assumption remains unresolved:
376
387
 
377
388
  - `discovery.yaml` and `context.md` are written;
378
389
  - no `spec.md` is generated;
@@ -393,26 +404,35 @@ specification stale, preserves it under `history/`, and generates a new
393
404
  specification bound to the new Discovery digest.
394
405
 
395
406
  The deterministic `--no-agent` path follows the same rules. It generates
396
- Discovery, records it, and stops when a blocking decision remains. It
397
- never invents an answer to continue.
407
+ Discovery, records it, and stops when any question or assumption
408
+ remains unresolved. It never invents an answer to continue.
398
409
 
399
410
  Changes created with `0.2.0` that have no `discovery.yaml` remain
400
411
  approvable as legacy changes, with an explicit warning. New changes
401
412
  require Discovery.
402
413
 
414
+ A generated specification is valid only when section 7 is exactly
415
+ `None.`. If the specification agent discovers a decision that Discovery
416
+ did not cover, DevFlow rejects the generated document, archives it,
417
+ appends the question to `discovery.yaml`, and returns the change to
418
+ `awaiting_clarification`. The question must be answered before a new
419
+ specification is generated. `devflow approve --stage spec` rejects a
420
+ specification that still lists open questions.
421
+
403
422
  ## Workflow
404
423
 
405
424
  1. Initialize the project with `devflow init`.
406
425
  2. Create a change and run Discovery.
407
- 3. Answer blocking questions and accept or reject assumptions.
426
+ 3. Answer every question and accept or reject assumptions.
408
427
  4. Generate the specification with `devflow spec --continue <id>`.
409
- 5. Review `spec.md` and resolve any remaining non-blocking questions.
428
+ 5. Review `spec.md`. It must have `None.` in section 7; unresolved
429
+ questions belong in Discovery.
410
430
  6. Record the approval.
411
431
  7. Inspect the state, artifacts and approval digests.
412
432
  8. If artifacts exist without workflow state, diagnose with
413
433
  `devflow doctor <id>` and repair with `devflow recover <id>`.
414
434
 
415
- Available commands in `0.3.3`:
435
+ Available commands in `0.3.4`:
416
436
 
417
437
  | Command | Status |
418
438
  | --- | --- |
@@ -452,7 +472,8 @@ The command:
452
472
  proposed assumptions;
453
473
  5. writes the deterministic evidence or declared architecture to
454
474
  `context.md`;
455
- 6. stops without `spec.md` when a blocking decision remains;
475
+ 6. stops without `spec.md` when any question or assumption remains
476
+ unresolved;
456
477
  7. in an interactive run, stops after Discovery is complete and prints
457
478
  the next command, so you can choose the harness for the
458
479
  specification;
@@ -486,13 +507,13 @@ devflow spec --continue 006
486
507
  ```
487
508
 
488
509
  `--continue` is not a new specification. It reuses the stored request
489
- and project mode, loads Discovery, and stops until blocking decisions
490
- are resolved. It reuses a current validated specification when the
491
- Discovery digest still matches; otherwise it archives the old
492
- specification and generates a new one. If an interrupted run left a
493
- complete `discovery.yaml` without `workflow.yaml`, `--continue` creates
494
- the missing state and registers Discovery before generating the
495
- specification.
510
+ and project mode, loads Discovery, and stops until every question is
511
+ answered and every assumption is accepted. It reuses a current
512
+ validated specification when the Discovery digest still matches;
513
+ otherwise it archives the old specification and generates a new one. If
514
+ an interrupted run left a complete `discovery.yaml` without
515
+ `workflow.yaml`, `--continue` creates the missing state and registers
516
+ Discovery before generating the specification.
496
517
 
497
518
  For an existing project, DevFlow inspects relevant code and
498
519
  dependencies. For Greenfield, it uses the declared architecture and
@@ -593,17 +614,18 @@ devflow approve 001 --stage spec
593
614
  ```
594
615
 
595
616
  Approval is explicit and binds the decision to the current artifact
596
- digests. For a `0.3.3` change it binds `spec.md`, `discovery.yaml` and,
617
+ digests. For a `0.3.4` change it binds `spec.md`, `discovery.yaml` and,
597
618
  when a manifest applies, the architecture manifest digest. Repeating the
598
619
  same approval is a no-op. If an artifact changes after validation,
599
620
  DevFlow marks it stale and refuses approval until it is regenerated and
600
621
  validated again.
601
622
 
602
623
  Discovery must be complete before approval. If it is not, approval fails
603
- and names the pending questions and assumptions. Legacy `0.2.0` changes
604
- without `discovery.yaml` remain approvable with a warning.
624
+ and names the pending questions and assumptions. Approval also rejects a
625
+ specification whose section 7 still lists open questions. Legacy `0.2.0`
626
+ changes without `discovery.yaml` remain approvable with a warning.
605
627
 
606
- Only the `spec` stage is available in `0.3.3`. `--stage plan` and
628
+ Only the `spec` stage is available in `0.3.4`. `--stage plan` and
607
629
  `--stage review` are rejected. There are no `plan`, `implement` or
608
630
  `review` commands in this release.
609
631
 
@@ -10,17 +10,21 @@ anyone starts implementing it. DevFlow owns the workflow state; the
10
10
  selected agent harness is only the execution backend that drafts the
11
11
  specification.
12
12
 
13
- This is the `0.3.3` MVP. It implements the **discovery and
13
+ This is the `0.3.4` MVP. It implements the **discovery and
14
14
  specification stages only**. It supports two specification contexts:
15
15
  **Existing Project** (the default) and **Greenfield**. It is not a
16
16
  complete SDD platform and does not include planning, implementation or
17
17
  review workflows.
18
18
 
19
19
  Discovery decides whether a request is ready to become a
20
- specification. A specification is only generated when every blocking
21
- question has an explicit answer and every proposed assumption has been
20
+ specification. A specification is only generated when every question
21
+ has an explicit answer and every proposed assumption has been
22
22
  explicitly accepted. Discovery is persisted, so an incomplete request
23
- can be resumed across sessions and agent harnesses.
23
+ can be resumed across sessions and agent harnesses. Discovery is also
24
+ the requirement-gathering stage: ambiguity, authentication,
25
+ permissions, moderation, data lifecycle, validation, ordering,
26
+ administration, compatibility and out-of-scope decisions must be
27
+ resolved there, not in `spec.md`.
24
28
 
25
29
  ## The problem it solves
26
30
 
@@ -82,7 +86,7 @@ pip install devflow-toolkit
82
86
  To install a specific built artifact instead:
83
87
 
84
88
  ```bash
85
- pip install devflow_toolkit-0.3.3-py3-none-any.whl
89
+ pip install devflow_toolkit-0.3.4-py3-none-any.whl
86
90
  ```
87
91
 
88
92
  Verify the installation:
@@ -246,7 +250,7 @@ as an architectural constraint when it is present.
246
250
 
247
251
  ### Harnesses
248
252
 
249
- | Harness | Status in 0.3.3 |
253
+ | Harness | Status in 0.3.4 |
250
254
  | --- | --- |
251
255
  | OpenCode | Verified end-to-end in non-interactive mode |
252
256
  | Codex | Integration files are generated, but not verified for this release |
@@ -329,18 +333,25 @@ assumptions:
329
333
  ```
330
334
 
331
335
  Each question has a `category` and an explicit `blocking` flag. The
332
- blocking categories are scope, user-visible behaviour, data and
333
- persistence, security and authentication, external integrations,
334
- architecture boundaries, new dependencies and deployment. A question
335
- may remain pending when it is genuinely non-blocking; it does not
336
- prevent specification generation.
336
+ categories are scope, user-visible behaviour, data and persistence,
337
+ security and authentication, external integrations, architecture
338
+ boundaries, new dependencies and deployment. The `blocking` flag
339
+ prioritizes the conversation; it does not make a question optional.
340
+ Every question, blocking or not, must be answered before
341
+ `discovery.yaml` can be `complete` and before a specification can be
342
+ generated.
343
+
344
+ For user-generated content, Discovery must also resolve who writes it,
345
+ who may create, edit or delete it, moderation, authentication
346
+ mechanism, validation, ordering, lifecycle on parent deletion, admin
347
+ registration, compatibility and explicit out-of-scope items.
337
348
 
338
349
  An assumption proposed by DevFlow uses `source: agent_default` and
339
350
  starts as `pending_acceptance`. It never becomes accepted automatically.
340
351
  A human must set `status: accepted` with `accepted_by` and `accepted_at`,
341
352
  or reject it and record a different decision.
342
353
 
343
- While blocking decisions remain:
354
+ While any question or assumption remains unresolved:
344
355
 
345
356
  - `discovery.yaml` and `context.md` are written;
346
357
  - no `spec.md` is generated;
@@ -361,26 +372,35 @@ specification stale, preserves it under `history/`, and generates a new
361
372
  specification bound to the new Discovery digest.
362
373
 
363
374
  The deterministic `--no-agent` path follows the same rules. It generates
364
- Discovery, records it, and stops when a blocking decision remains. It
365
- never invents an answer to continue.
375
+ Discovery, records it, and stops when any question or assumption
376
+ remains unresolved. It never invents an answer to continue.
366
377
 
367
378
  Changes created with `0.2.0` that have no `discovery.yaml` remain
368
379
  approvable as legacy changes, with an explicit warning. New changes
369
380
  require Discovery.
370
381
 
382
+ A generated specification is valid only when section 7 is exactly
383
+ `None.`. If the specification agent discovers a decision that Discovery
384
+ did not cover, DevFlow rejects the generated document, archives it,
385
+ appends the question to `discovery.yaml`, and returns the change to
386
+ `awaiting_clarification`. The question must be answered before a new
387
+ specification is generated. `devflow approve --stage spec` rejects a
388
+ specification that still lists open questions.
389
+
371
390
  ## Workflow
372
391
 
373
392
  1. Initialize the project with `devflow init`.
374
393
  2. Create a change and run Discovery.
375
- 3. Answer blocking questions and accept or reject assumptions.
394
+ 3. Answer every question and accept or reject assumptions.
376
395
  4. Generate the specification with `devflow spec --continue <id>`.
377
- 5. Review `spec.md` and resolve any remaining non-blocking questions.
396
+ 5. Review `spec.md`. It must have `None.` in section 7; unresolved
397
+ questions belong in Discovery.
378
398
  6. Record the approval.
379
399
  7. Inspect the state, artifacts and approval digests.
380
400
  8. If artifacts exist without workflow state, diagnose with
381
401
  `devflow doctor <id>` and repair with `devflow recover <id>`.
382
402
 
383
- Available commands in `0.3.3`:
403
+ Available commands in `0.3.4`:
384
404
 
385
405
  | Command | Status |
386
406
  | --- | --- |
@@ -420,7 +440,8 @@ The command:
420
440
  proposed assumptions;
421
441
  5. writes the deterministic evidence or declared architecture to
422
442
  `context.md`;
423
- 6. stops without `spec.md` when a blocking decision remains;
443
+ 6. stops without `spec.md` when any question or assumption remains
444
+ unresolved;
424
445
  7. in an interactive run, stops after Discovery is complete and prints
425
446
  the next command, so you can choose the harness for the
426
447
  specification;
@@ -454,13 +475,13 @@ devflow spec --continue 006
454
475
  ```
455
476
 
456
477
  `--continue` is not a new specification. It reuses the stored request
457
- and project mode, loads Discovery, and stops until blocking decisions
458
- are resolved. It reuses a current validated specification when the
459
- Discovery digest still matches; otherwise it archives the old
460
- specification and generates a new one. If an interrupted run left a
461
- complete `discovery.yaml` without `workflow.yaml`, `--continue` creates
462
- the missing state and registers Discovery before generating the
463
- specification.
478
+ and project mode, loads Discovery, and stops until every question is
479
+ answered and every assumption is accepted. It reuses a current
480
+ validated specification when the Discovery digest still matches;
481
+ otherwise it archives the old specification and generates a new one. If
482
+ an interrupted run left a complete `discovery.yaml` without
483
+ `workflow.yaml`, `--continue` creates the missing state and registers
484
+ Discovery before generating the specification.
464
485
 
465
486
  For an existing project, DevFlow inspects relevant code and
466
487
  dependencies. For Greenfield, it uses the declared architecture and
@@ -561,17 +582,18 @@ devflow approve 001 --stage spec
561
582
  ```
562
583
 
563
584
  Approval is explicit and binds the decision to the current artifact
564
- digests. For a `0.3.3` change it binds `spec.md`, `discovery.yaml` and,
585
+ digests. For a `0.3.4` change it binds `spec.md`, `discovery.yaml` and,
565
586
  when a manifest applies, the architecture manifest digest. Repeating the
566
587
  same approval is a no-op. If an artifact changes after validation,
567
588
  DevFlow marks it stale and refuses approval until it is regenerated and
568
589
  validated again.
569
590
 
570
591
  Discovery must be complete before approval. If it is not, approval fails
571
- and names the pending questions and assumptions. Legacy `0.2.0` changes
572
- without `discovery.yaml` remain approvable with a warning.
592
+ and names the pending questions and assumptions. Approval also rejects a
593
+ specification whose section 7 still lists open questions. Legacy `0.2.0`
594
+ changes without `discovery.yaml` remain approvable with a warning.
573
595
 
574
- Only the `spec` stage is available in `0.3.3`. `--stage plan` and
596
+ Only the `spec` stage is available in `0.3.4`. `--stage plan` and
575
597
  `--stage review` are rejected. There are no `plan`, `implement` or
576
598
  `review` commands in this release.
577
599
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "devflow-toolkit"
7
- version = "0.3.3"
7
+ version = "0.3.4"
8
8
  description = "Specification workflow toolkit for AI-assisted software changes"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -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.3"
38
+ current_version = "0.3.4"
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.3. "
60
+ f"Stage '{stage}' is not available in DevFlow 0.3.4. "
61
61
  "Only the 'spec' stage can be approved."
62
62
  )
63
63
  raise UnsupportedStageError(msg)
@@ -245,7 +245,7 @@ def _create_specification(
245
245
  if result.discovery is not None:
246
246
  console.print(
247
247
  f"[bold]Discovery:[/bold] {result.discovery.status} "
248
- f"({len(result.discovery.pending_blocking)} blocking, "
248
+ f"({len(result.discovery.pending_questions)} pending, "
249
249
  f"{len(result.discovery.pending_assumptions)} assumptions)"
250
250
  )
251
251
  if result.discovery_digest:
@@ -568,6 +568,6 @@ def _print_result(
568
568
  f"[bold]Discovery:[/bold] {result.discovery.status}"
569
569
  )
570
570
  console.print(
571
- "\nNext: review the specification, resolve any remaining "
572
- "non-blocking questions, and approve it before implementation."
571
+ "\nNext: review the specification and approve it before "
572
+ "implementation."
573
573
  )
@@ -128,6 +128,7 @@ def _print_discovery(
128
128
  return
129
129
  console.print(
130
130
  f" status: {discovery.status} · "
131
+ f"{len(discovery.pending_questions)} pending · "
131
132
  f"{len(discovery.pending_blocking)} blocking · "
132
133
  f"{len(discovery.pending_assumptions)} assumptions"
133
134
  )