devflow-toolkit 0.3.3__tar.gz → 0.3.5__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.
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/CHANGELOG.md +36 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/PKG-INFO +58 -30
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/README.md +57 -29
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/pyproject.toml +1 -1
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/cli.py +1 -1
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/approve.py +1 -1
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/harness.py +42 -8
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/spec.py +5 -3
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/status.py +1 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/discovery.py +317 -26
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/spec_workflow.py +115 -12
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/specification.py +9 -25
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/manager.py +23 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/prompts/__init__.py +34 -17
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/prompts/discovery.md +58 -9
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/prompts/spec.greenfield.md +13 -7
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/prompts/spec.md +12 -6
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_cli.py +1 -1
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_discovery.py +97 -8
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_harness_adapters.py +52 -1
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_spec_workflow.py +36 -1
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/.gitignore +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/LICENSE +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/agents.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/base.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/claude_code.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/codex.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/detector.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/instructions.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/kiro.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/opencode.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/adapters/registry.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/doctor.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/init.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/commands/recover.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/architecture.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/artifacts/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/artifacts/errors.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/artifacts/models.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/artifacts/store.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/clock.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/config.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/constitution.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/ports.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/profile_manager.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/project.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/recovery.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/errors.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/events.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/locator.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/lock.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/models.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/core/state/transitions.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/models/__init__.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/models/profile.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/models/project.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/base/constitution/architecture.md +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/base/constitution/constitution.md +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/base/profile.yaml +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/django-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_event_log.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_greenfield.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_hardening.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_recovery.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_state.py +0 -0
- {devflow_toolkit-0.3.3 → devflow_toolkit-0.3.5}/tests/test_state_replay.py +0 -0
|
@@ -2,6 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to DevFlow Toolkit are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.3.5 - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Interactive `devflow spec` now asks which installed agent harness to
|
|
10
|
+
use even when `.devflow/config.yaml` already names one. Previously it
|
|
11
|
+
started the configured harness directly, so `--harness` had to be
|
|
12
|
+
passed to make a different choice. The configured harness is offered
|
|
13
|
+
as the prompt default. Pass `--harness <name>` to skip the prompt or
|
|
14
|
+
`--no-agent` to use deterministic analysis.
|
|
15
|
+
- Package version is `0.3.5`.
|
|
16
|
+
|
|
17
|
+
## 0.3.4 - 2026-11-04
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Discovery is now strict: every question must be answered, including
|
|
22
|
+
questions marked `blocking: false`, and every proposed assumption
|
|
23
|
+
must be accepted before a specification is generated or approved.
|
|
24
|
+
`blocking` only prioritizes the conversation.
|
|
25
|
+
- Discovery now covers interpretation, authentication and
|
|
26
|
+
authorization, moderation, data lifecycle, validation, ordering,
|
|
27
|
+
administration, compatibility and out-of-scope decisions. The
|
|
28
|
+
discovery prompt and the deterministic planner add these questions
|
|
29
|
+
for user-generated content such as comments.
|
|
30
|
+
- `spec.md` is valid only when section 7 is exactly `None.`. When the
|
|
31
|
+
specification agent finds an unanswered decision, DevFlow archives
|
|
32
|
+
the generated document, appends the question to `discovery.yaml`
|
|
33
|
+
with a new `Qn` identifier, and returns the change to
|
|
34
|
+
`awaiting_clarification` instead of accepting the question in the
|
|
35
|
+
specification.
|
|
36
|
+
- `devflow approve --stage spec` rejects a specification whose section
|
|
37
|
+
7 still lists open questions.
|
|
38
|
+
- Legacy changes without `discovery.yaml` keep their previous behavior.
|
|
39
|
+
- Package version is `0.3.4`.
|
|
40
|
+
|
|
5
41
|
## 0.3.3 - 2026-11-04
|
|
6
42
|
|
|
7
43
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: devflow-toolkit
|
|
3
|
-
Version: 0.3.
|
|
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,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.
|
|
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
|
|
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
|
|
53
|
-
|
|
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.
|
|
121
|
+
pip install devflow_toolkit-0.3.5-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.
|
|
285
|
+
| Harness | Status in 0.3.5 |
|
|
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
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
435
|
+
Available commands in `0.3.5`:
|
|
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
|
|
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;
|
|
@@ -472,6 +493,12 @@ devflow spec "Add a GET /patients endpoint"
|
|
|
472
493
|
devflow spec --continue 006 . --harness opencode
|
|
473
494
|
```
|
|
474
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
|
+
|
|
475
502
|
Use `--auto` to run both phases in a single invocation, as earlier
|
|
476
503
|
releases did:
|
|
477
504
|
|
|
@@ -486,13 +513,13 @@ devflow spec --continue 006
|
|
|
486
513
|
```
|
|
487
514
|
|
|
488
515
|
`--continue` is not a new specification. It reuses the stored request
|
|
489
|
-
and project mode, loads Discovery, and stops until
|
|
490
|
-
|
|
491
|
-
Discovery digest still matches;
|
|
492
|
-
specification and generates a new one. If
|
|
493
|
-
complete `discovery.yaml` without
|
|
494
|
-
the missing state and registers
|
|
495
|
-
specification.
|
|
516
|
+
and project mode, loads Discovery, and stops until every question is
|
|
517
|
+
answered and every assumption is accepted. It reuses a current
|
|
518
|
+
validated specification when the Discovery digest still matches;
|
|
519
|
+
otherwise it archives the old specification and generates a new one. If
|
|
520
|
+
an interrupted run left a complete `discovery.yaml` without
|
|
521
|
+
`workflow.yaml`, `--continue` creates the missing state and registers
|
|
522
|
+
Discovery before generating the specification.
|
|
496
523
|
|
|
497
524
|
For an existing project, DevFlow inspects relevant code and
|
|
498
525
|
dependencies. For Greenfield, it uses the declared architecture and
|
|
@@ -593,17 +620,18 @@ devflow approve 001 --stage spec
|
|
|
593
620
|
```
|
|
594
621
|
|
|
595
622
|
Approval is explicit and binds the decision to the current artifact
|
|
596
|
-
digests. For a `0.3.
|
|
623
|
+
digests. For a `0.3.5` change it binds `spec.md`, `discovery.yaml` and,
|
|
597
624
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
598
625
|
same approval is a no-op. If an artifact changes after validation,
|
|
599
626
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
600
627
|
validated again.
|
|
601
628
|
|
|
602
629
|
Discovery must be complete before approval. If it is not, approval fails
|
|
603
|
-
and names the pending questions and assumptions.
|
|
604
|
-
|
|
630
|
+
and names the pending questions and assumptions. Approval also rejects a
|
|
631
|
+
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
632
|
+
changes without `discovery.yaml` remain approvable with a warning.
|
|
605
633
|
|
|
606
|
-
Only the `spec` stage is available in `0.3.
|
|
634
|
+
Only the `spec` stage is available in `0.3.5`. `--stage plan` and
|
|
607
635
|
`--stage review` are rejected. There are no `plan`, `implement` or
|
|
608
636
|
`review` commands in this release.
|
|
609
637
|
|
|
@@ -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.
|
|
13
|
+
This is the `0.3.5` 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
|
|
21
|
-
|
|
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.
|
|
89
|
+
pip install devflow_toolkit-0.3.5-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.
|
|
253
|
+
| Harness | Status in 0.3.5 |
|
|
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
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
403
|
+
Available commands in `0.3.5`:
|
|
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
|
|
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;
|
|
@@ -440,6 +461,12 @@ devflow spec "Add a GET /patients endpoint"
|
|
|
440
461
|
devflow spec --continue 006 . --harness opencode
|
|
441
462
|
```
|
|
442
463
|
|
|
464
|
+
When no `--harness` is passed, an interactive `devflow spec` asks which
|
|
465
|
+
installed harness to use before starting, even if `.devflow/config.yaml`
|
|
466
|
+
already names one. The configured harness is offered as the default.
|
|
467
|
+
Pass `--harness <name>` to skip the prompt, or `--no-agent` to use
|
|
468
|
+
deterministic static analysis.
|
|
469
|
+
|
|
443
470
|
Use `--auto` to run both phases in a single invocation, as earlier
|
|
444
471
|
releases did:
|
|
445
472
|
|
|
@@ -454,13 +481,13 @@ devflow spec --continue 006
|
|
|
454
481
|
```
|
|
455
482
|
|
|
456
483
|
`--continue` is not a new specification. It reuses the stored request
|
|
457
|
-
and project mode, loads Discovery, and stops until
|
|
458
|
-
|
|
459
|
-
Discovery digest still matches;
|
|
460
|
-
specification and generates a new one. If
|
|
461
|
-
complete `discovery.yaml` without
|
|
462
|
-
the missing state and registers
|
|
463
|
-
specification.
|
|
484
|
+
and project mode, loads Discovery, and stops until every question is
|
|
485
|
+
answered and every assumption is accepted. It reuses a current
|
|
486
|
+
validated specification when the Discovery digest still matches;
|
|
487
|
+
otherwise it archives the old specification and generates a new one. If
|
|
488
|
+
an interrupted run left a complete `discovery.yaml` without
|
|
489
|
+
`workflow.yaml`, `--continue` creates the missing state and registers
|
|
490
|
+
Discovery before generating the specification.
|
|
464
491
|
|
|
465
492
|
For an existing project, DevFlow inspects relevant code and
|
|
466
493
|
dependencies. For Greenfield, it uses the declared architecture and
|
|
@@ -561,17 +588,18 @@ devflow approve 001 --stage spec
|
|
|
561
588
|
```
|
|
562
589
|
|
|
563
590
|
Approval is explicit and binds the decision to the current artifact
|
|
564
|
-
digests. For a `0.3.
|
|
591
|
+
digests. For a `0.3.5` change it binds `spec.md`, `discovery.yaml` and,
|
|
565
592
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
566
593
|
same approval is a no-op. If an artifact changes after validation,
|
|
567
594
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
568
595
|
validated again.
|
|
569
596
|
|
|
570
597
|
Discovery must be complete before approval. If it is not, approval fails
|
|
571
|
-
and names the pending questions and assumptions.
|
|
572
|
-
|
|
598
|
+
and names the pending questions and assumptions. Approval also rejects a
|
|
599
|
+
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
600
|
+
changes without `discovery.yaml` remain approvable with a warning.
|
|
573
601
|
|
|
574
|
-
Only the `spec` stage is available in `0.3.
|
|
602
|
+
Only the `spec` stage is available in `0.3.5`. `--stage plan` and
|
|
575
603
|
`--stage review` are rejected. There are no `plan`, `implement` or
|
|
576
604
|
`review` commands in this release.
|
|
577
605
|
|
|
@@ -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.
|
|
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(
|
|
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
|
-
|
|
115
|
+
choices = [*names]
|
|
116
|
+
if include_none:
|
|
117
|
+
choices.append("none")
|
|
118
|
+
typer.echo("Available agent harnesses:")
|
|
89
119
|
for name in names:
|
|
90
|
-
|
|
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(
|
|
126
|
+
"Agent harness (" + "/".join(choices) + ")",
|
|
127
|
+
default=default or "",
|
|
94
128
|
)
|
|
95
129
|
canonical = canonical_harness_name(answer)
|
|
96
|
-
if canonical in
|
|
130
|
+
if canonical in choices:
|
|
97
131
|
return canonical
|
|
98
|
-
typer.echo(f"Choose one of: {', '.join(
|
|
132
|
+
typer.echo(f"Choose one of: {', '.join(choices)}")
|
|
@@ -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
|
|
|
@@ -245,7 +247,7 @@ def _create_specification(
|
|
|
245
247
|
if result.discovery is not None:
|
|
246
248
|
console.print(
|
|
247
249
|
f"[bold]Discovery:[/bold] {result.discovery.status} "
|
|
248
|
-
f"({len(result.discovery.
|
|
250
|
+
f"({len(result.discovery.pending_questions)} pending, "
|
|
249
251
|
f"{len(result.discovery.pending_assumptions)} assumptions)"
|
|
250
252
|
)
|
|
251
253
|
if result.discovery_digest:
|
|
@@ -568,6 +570,6 @@ def _print_result(
|
|
|
568
570
|
f"[bold]Discovery:[/bold] {result.discovery.status}"
|
|
569
571
|
)
|
|
570
572
|
console.print(
|
|
571
|
-
"\nNext: review the specification
|
|
572
|
-
"
|
|
573
|
+
"\nNext: review the specification and approve it before "
|
|
574
|
+
"implementation."
|
|
573
575
|
)
|
|
@@ -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
|
)
|