devflow-toolkit 0.3.16__tar.gz → 0.3.17__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.16 → devflow_toolkit-0.3.17}/CHANGELOG.md +24 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/PKG-INFO +44 -20
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/README.md +43 -19
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/pyproject.toml +1 -1
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/cli.py +1 -1
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/approve.py +1 -1
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/spec_workflow.py +0 -101
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/specification.py +80 -109
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/base/constitution/code-standards.md +5 -4
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/base/constitution/constitution.md +25 -8
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/prompts/__init__.py +90 -100
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/prompts/discovery.md +23 -24
- devflow_toolkit-0.3.16/src/devflow/prompts/spec.greenfield.md → devflow_toolkit-0.3.17/src/devflow/prompts/spec.md +88 -24
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_discovery.py +7 -4
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_discovery_decisions.py +4 -4
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_greenfield.py +19 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_hardening.py +1 -1
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_harness_adapters.py +37 -1
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_spec_workflow.py +1 -1
- devflow_toolkit-0.3.16/src/devflow/prompts/spec.md +0 -126
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/.gitignore +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/LICENSE +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/agents.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/antigravity.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/base.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/claude_code.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/codex.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/detector.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/instructions.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/kiro.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/opencode.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/adapters/registry.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/doctor.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/harness.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/init.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/recover.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/spec.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/commands/status.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/architecture.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/artifacts/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/artifacts/errors.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/artifacts/models.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/artifacts/store.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/clock.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/config.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/constitution.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/discovery.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/ports.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/profile_manager.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/project.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/recovery.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/errors.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/events.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/locator.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/lock.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/manager.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/models.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/core/state/transitions.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/models/__init__.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/models/profile.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/models/project.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/base/constitution/architecture.md +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/base/profile.yaml +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/django-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_cli.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_event_log.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_recovery.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/tests/test_state.py +0 -0
- {devflow_toolkit-0.3.16 → devflow_toolkit-0.3.17}/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.17 - 2026-11-06
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- `context.md` is now the single generated context file. Its
|
|
10
|
+
`## 1. Decision Context` section merges the former
|
|
11
|
+
`decision-context.md` with project facts, conventions, approved
|
|
12
|
+
decisions, evidence and pending decisions. Its
|
|
13
|
+
`## 2. Project Evidence` section contains the request, static
|
|
14
|
+
analysis, relevant code, constitution scope and declared architecture.
|
|
15
|
+
- Removed the separate `decision-context.md` artifact, its digest and
|
|
16
|
+
the inline discovery decision list from the specification prompt.
|
|
17
|
+
- The base constitution now defines a single `Instruction Precedence`
|
|
18
|
+
hierarchy. The Discovery and specification prompts reference it
|
|
19
|
+
instead of repeating conflict rules.
|
|
20
|
+
- `spec.md` is now a single template with `existing` and `greenfield`
|
|
21
|
+
conditional blocks. `spec.greenfield.md` was removed.
|
|
22
|
+
- Discovery resolves decisions in one order: explicit user answers,
|
|
23
|
+
constitution and profiles, declared architecture, existing code,
|
|
24
|
+
previous specifications and reversible defaults.
|
|
25
|
+
- The code standards no longer require one line per parameter when a
|
|
26
|
+
function has more than two parameters.
|
|
27
|
+
- Package version is `0.3.17`.
|
|
28
|
+
|
|
5
29
|
## 0.3.16 - 2026-11-05
|
|
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
|
+
Version: 0.3.17
|
|
4
4
|
Summary: Specification workflow toolkit for AI-assisted software changes
|
|
5
5
|
Author: DevFlow contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -42,16 +42,16 @@ 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.17` 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
|
-
|
|
54
|
-
|
|
52
|
+
specification. A specification is only generated when every decision is
|
|
53
|
+
`resolved` or `assumed`, and every assumption has been explicitly
|
|
54
|
+
accepted. Discovery is persisted, so an incomplete request
|
|
55
55
|
can be resumed across sessions and agent harnesses. Discovery is also
|
|
56
56
|
the requirement-gathering stage: ambiguity, authentication,
|
|
57
57
|
permissions, moderation, data lifecycle, validation, ordering,
|
|
@@ -95,6 +95,26 @@ identity for the project:
|
|
|
95
95
|
- DevFlow never switches modes silently. Use `--project-mode` explicitly
|
|
96
96
|
when a run differs from the configured default.
|
|
97
97
|
|
|
98
|
+
## Instruction precedence
|
|
99
|
+
|
|
100
|
+
Every generated `context.md` has two numbered sections: the
|
|
101
|
+
`Decision Context` and the `Project Evidence`. The Decision Context is
|
|
102
|
+
authoritative for decisions; the Project Evidence supports it. When
|
|
103
|
+
instructions conflict, DevFlow applies this order, highest priority
|
|
104
|
+
first:
|
|
105
|
+
|
|
106
|
+
1. Explicit decisions approved by the user.
|
|
107
|
+
2. The approved specification.
|
|
108
|
+
3. The constitution and the enabled technology profiles.
|
|
109
|
+
4. The declared architecture and verified project conventions.
|
|
110
|
+
5. General good practices.
|
|
111
|
+
6. Agent preferences.
|
|
112
|
+
|
|
113
|
+
A lower-priority instruction never overrides a higher-priority one. When
|
|
114
|
+
two instructions at the same level conflict, the agent asks instead of
|
|
115
|
+
resolving the conflict silently. The prompts state the output contract;
|
|
116
|
+
DevFlow's Python code applies the enforcement.
|
|
117
|
+
|
|
98
118
|
## Requirements
|
|
99
119
|
|
|
100
120
|
- Python 3.11 or newer.
|
|
@@ -119,7 +139,7 @@ pip install devflow-toolkit
|
|
|
119
139
|
To install a specific built artifact instead:
|
|
120
140
|
|
|
121
141
|
```bash
|
|
122
|
-
pip install devflow_toolkit-0.3.
|
|
142
|
+
pip install devflow_toolkit-0.3.17-py3-none-any.whl
|
|
123
143
|
```
|
|
124
144
|
|
|
125
145
|
Verify the installation:
|
|
@@ -299,7 +319,7 @@ as an architectural constraint when it is present.
|
|
|
299
319
|
|
|
300
320
|
### Harnesses
|
|
301
321
|
|
|
302
|
-
| Harness | Status in 0.3.
|
|
322
|
+
| Harness | Status in 0.3.17 |
|
|
303
323
|
| --- | --- |
|
|
304
324
|
| OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
|
|
305
325
|
| Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
|
|
@@ -501,15 +521,19 @@ or reject it and record a different decision.
|
|
|
501
521
|
|
|
502
522
|
While any decision is pending or any assumption remains unaccepted:
|
|
503
523
|
|
|
504
|
-
- `discovery.yaml
|
|
524
|
+
- `discovery.yaml` and `context.md` are written;
|
|
505
525
|
- no `spec.md` is generated;
|
|
506
526
|
- `devflow approve --stage spec` refuses the change;
|
|
507
527
|
- the workflow status is `awaiting_clarification`.
|
|
508
528
|
|
|
509
|
-
`
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
529
|
+
`context.md` is the single generated context file. Its
|
|
530
|
+
`## 1. Decision Context` section is generated deterministically by
|
|
531
|
+
DevFlow from the project facts, conventions, approved decisions,
|
|
532
|
+
evidence, pending decisions and constraints. Its
|
|
533
|
+
`## 2. Project Evidence` section contains the request, static analysis,
|
|
534
|
+
relevant code, constitution scope and declared architecture. The file is
|
|
535
|
+
capped and carries the Discovery and architecture digests, so a new
|
|
536
|
+
session does not need to rediscover the whole project.
|
|
513
537
|
|
|
514
538
|
Answer the questions in the file, or run an interactive harness, then
|
|
515
539
|
resume:
|
|
@@ -553,7 +577,7 @@ specification that still lists open questions.
|
|
|
553
577
|
8. If artifacts exist without workflow state, diagnose with
|
|
554
578
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
555
579
|
|
|
556
|
-
Available commands in `0.3.
|
|
580
|
+
Available commands in `0.3.17`:
|
|
557
581
|
|
|
558
582
|
| Command | Status |
|
|
559
583
|
| --- | --- |
|
|
@@ -591,8 +615,8 @@ The command:
|
|
|
591
615
|
default, or `greenfield`);
|
|
592
616
|
4. creates a persistent `discovery.yaml` with classified questions and
|
|
593
617
|
proposed assumptions;
|
|
594
|
-
5. writes the
|
|
595
|
-
`context.md`;
|
|
618
|
+
5. writes the Decision Context and the project evidence or declared
|
|
619
|
+
architecture to `context.md`;
|
|
596
620
|
6. stops without `spec.md` when any question or assumption remains
|
|
597
621
|
unresolved;
|
|
598
622
|
7. in an interactive run, stops after Discovery is complete and prints
|
|
@@ -634,8 +658,8 @@ devflow spec --continue 006
|
|
|
634
658
|
```
|
|
635
659
|
|
|
636
660
|
`--continue` is not a new specification. It reuses the stored request
|
|
637
|
-
and project mode, loads Discovery, and stops until
|
|
638
|
-
|
|
661
|
+
and project mode, loads Discovery, and stops until no decision is
|
|
662
|
+
pending and every assumption is accepted. It reuses a current
|
|
639
663
|
validated specification when the Discovery digest still matches;
|
|
640
664
|
otherwise it archives the old specification and generates a new one. If
|
|
641
665
|
an interrupted run left a complete `discovery.yaml` without
|
|
@@ -745,7 +769,7 @@ devflow approve 001 --stage spec
|
|
|
745
769
|
```
|
|
746
770
|
|
|
747
771
|
Approval is explicit and binds the decision to the current artifact
|
|
748
|
-
digests. For a `0.3.
|
|
772
|
+
digests. For a `0.3.17` change it binds `spec.md`, `discovery.yaml` and,
|
|
749
773
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
750
774
|
same approval is a no-op. If an artifact changes after validation,
|
|
751
775
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -756,7 +780,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
756
780
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
757
781
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
758
782
|
|
|
759
|
-
Only the `spec` stage is available in `0.3.
|
|
783
|
+
Only the `spec` stage is available in `0.3.17`. `--stage plan` and
|
|
760
784
|
`--stage review` are rejected. There are no `plan`, `implement` or
|
|
761
785
|
`review` commands in this release.
|
|
762
786
|
|
|
@@ -776,7 +800,7 @@ my-project/
|
|
|
776
800
|
│ └── specs/
|
|
777
801
|
│ └── 001-add-patients-endpoint/
|
|
778
802
|
│ ├── discovery.yaml # persistent questions and answers
|
|
779
|
-
│ ├── context.md
|
|
803
|
+
│ ├── context.md # Decision Context + Project Evidence
|
|
780
804
|
│ ├── spec.md # only when Discovery is complete
|
|
781
805
|
│ ├── workflow.yaml # projection of events.jsonl
|
|
782
806
|
│ ├── events.jsonl # append-only source of truth
|
|
@@ -10,16 +10,16 @@ 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.17` 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
|
-
|
|
22
|
-
|
|
20
|
+
specification. A specification is only generated when every decision is
|
|
21
|
+
`resolved` or `assumed`, and every assumption has been explicitly
|
|
22
|
+
accepted. Discovery is persisted, so an incomplete request
|
|
23
23
|
can be resumed across sessions and agent harnesses. Discovery is also
|
|
24
24
|
the requirement-gathering stage: ambiguity, authentication,
|
|
25
25
|
permissions, moderation, data lifecycle, validation, ordering,
|
|
@@ -63,6 +63,26 @@ identity for the project:
|
|
|
63
63
|
- DevFlow never switches modes silently. Use `--project-mode` explicitly
|
|
64
64
|
when a run differs from the configured default.
|
|
65
65
|
|
|
66
|
+
## Instruction precedence
|
|
67
|
+
|
|
68
|
+
Every generated `context.md` has two numbered sections: the
|
|
69
|
+
`Decision Context` and the `Project Evidence`. The Decision Context is
|
|
70
|
+
authoritative for decisions; the Project Evidence supports it. When
|
|
71
|
+
instructions conflict, DevFlow applies this order, highest priority
|
|
72
|
+
first:
|
|
73
|
+
|
|
74
|
+
1. Explicit decisions approved by the user.
|
|
75
|
+
2. The approved specification.
|
|
76
|
+
3. The constitution and the enabled technology profiles.
|
|
77
|
+
4. The declared architecture and verified project conventions.
|
|
78
|
+
5. General good practices.
|
|
79
|
+
6. Agent preferences.
|
|
80
|
+
|
|
81
|
+
A lower-priority instruction never overrides a higher-priority one. When
|
|
82
|
+
two instructions at the same level conflict, the agent asks instead of
|
|
83
|
+
resolving the conflict silently. The prompts state the output contract;
|
|
84
|
+
DevFlow's Python code applies the enforcement.
|
|
85
|
+
|
|
66
86
|
## Requirements
|
|
67
87
|
|
|
68
88
|
- Python 3.11 or newer.
|
|
@@ -87,7 +107,7 @@ pip install devflow-toolkit
|
|
|
87
107
|
To install a specific built artifact instead:
|
|
88
108
|
|
|
89
109
|
```bash
|
|
90
|
-
pip install devflow_toolkit-0.3.
|
|
110
|
+
pip install devflow_toolkit-0.3.17-py3-none-any.whl
|
|
91
111
|
```
|
|
92
112
|
|
|
93
113
|
Verify the installation:
|
|
@@ -267,7 +287,7 @@ as an architectural constraint when it is present.
|
|
|
267
287
|
|
|
268
288
|
### Harnesses
|
|
269
289
|
|
|
270
|
-
| Harness | Status in 0.3.
|
|
290
|
+
| Harness | Status in 0.3.17 |
|
|
271
291
|
| --- | --- |
|
|
272
292
|
| OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
|
|
273
293
|
| Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
|
|
@@ -469,15 +489,19 @@ or reject it and record a different decision.
|
|
|
469
489
|
|
|
470
490
|
While any decision is pending or any assumption remains unaccepted:
|
|
471
491
|
|
|
472
|
-
- `discovery.yaml
|
|
492
|
+
- `discovery.yaml` and `context.md` are written;
|
|
473
493
|
- no `spec.md` is generated;
|
|
474
494
|
- `devflow approve --stage spec` refuses the change;
|
|
475
495
|
- the workflow status is `awaiting_clarification`.
|
|
476
496
|
|
|
477
|
-
`
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
497
|
+
`context.md` is the single generated context file. Its
|
|
498
|
+
`## 1. Decision Context` section is generated deterministically by
|
|
499
|
+
DevFlow from the project facts, conventions, approved decisions,
|
|
500
|
+
evidence, pending decisions and constraints. Its
|
|
501
|
+
`## 2. Project Evidence` section contains the request, static analysis,
|
|
502
|
+
relevant code, constitution scope and declared architecture. The file is
|
|
503
|
+
capped and carries the Discovery and architecture digests, so a new
|
|
504
|
+
session does not need to rediscover the whole project.
|
|
481
505
|
|
|
482
506
|
Answer the questions in the file, or run an interactive harness, then
|
|
483
507
|
resume:
|
|
@@ -521,7 +545,7 @@ specification that still lists open questions.
|
|
|
521
545
|
8. If artifacts exist without workflow state, diagnose with
|
|
522
546
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
523
547
|
|
|
524
|
-
Available commands in `0.3.
|
|
548
|
+
Available commands in `0.3.17`:
|
|
525
549
|
|
|
526
550
|
| Command | Status |
|
|
527
551
|
| --- | --- |
|
|
@@ -559,8 +583,8 @@ The command:
|
|
|
559
583
|
default, or `greenfield`);
|
|
560
584
|
4. creates a persistent `discovery.yaml` with classified questions and
|
|
561
585
|
proposed assumptions;
|
|
562
|
-
5. writes the
|
|
563
|
-
`context.md`;
|
|
586
|
+
5. writes the Decision Context and the project evidence or declared
|
|
587
|
+
architecture to `context.md`;
|
|
564
588
|
6. stops without `spec.md` when any question or assumption remains
|
|
565
589
|
unresolved;
|
|
566
590
|
7. in an interactive run, stops after Discovery is complete and prints
|
|
@@ -602,8 +626,8 @@ devflow spec --continue 006
|
|
|
602
626
|
```
|
|
603
627
|
|
|
604
628
|
`--continue` is not a new specification. It reuses the stored request
|
|
605
|
-
and project mode, loads Discovery, and stops until
|
|
606
|
-
|
|
629
|
+
and project mode, loads Discovery, and stops until no decision is
|
|
630
|
+
pending and every assumption is accepted. It reuses a current
|
|
607
631
|
validated specification when the Discovery digest still matches;
|
|
608
632
|
otherwise it archives the old specification and generates a new one. If
|
|
609
633
|
an interrupted run left a complete `discovery.yaml` without
|
|
@@ -713,7 +737,7 @@ devflow approve 001 --stage spec
|
|
|
713
737
|
```
|
|
714
738
|
|
|
715
739
|
Approval is explicit and binds the decision to the current artifact
|
|
716
|
-
digests. For a `0.3.
|
|
740
|
+
digests. For a `0.3.17` change it binds `spec.md`, `discovery.yaml` and,
|
|
717
741
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
718
742
|
same approval is a no-op. If an artifact changes after validation,
|
|
719
743
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -724,7 +748,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
724
748
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
725
749
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
726
750
|
|
|
727
|
-
Only the `spec` stage is available in `0.3.
|
|
751
|
+
Only the `spec` stage is available in `0.3.17`. `--stage plan` and
|
|
728
752
|
`--stage review` are rejected. There are no `plan`, `implement` or
|
|
729
753
|
`review` commands in this release.
|
|
730
754
|
|
|
@@ -744,7 +768,7 @@ my-project/
|
|
|
744
768
|
│ └── specs/
|
|
745
769
|
│ └── 001-add-patients-endpoint/
|
|
746
770
|
│ ├── discovery.yaml # persistent questions and answers
|
|
747
|
-
│ ├── context.md
|
|
771
|
+
│ ├── context.md # Decision Context + Project Evidence
|
|
748
772
|
│ ├── spec.md # only when Discovery is complete
|
|
749
773
|
│ ├── workflow.yaml # projection of events.jsonl
|
|
750
774
|
│ ├── events.jsonl # append-only source of truth
|
|
@@ -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.17. "
|
|
61
61
|
"Only the 'spec' stage can be approved."
|
|
62
62
|
)
|
|
63
63
|
raise UnsupportedStageError(msg)
|
|
@@ -48,7 +48,6 @@ from devflow.models.project import (
|
|
|
48
48
|
)
|
|
49
49
|
from devflow.models.profile import Profile
|
|
50
50
|
from devflow.prompts import (
|
|
51
|
-
build_decision_context,
|
|
52
51
|
build_discovery_prompt,
|
|
53
52
|
build_spec_prompt,
|
|
54
53
|
)
|
|
@@ -317,9 +316,6 @@ class SpecWorkflow:
|
|
|
317
316
|
),
|
|
318
317
|
config=config,
|
|
319
318
|
project=project,
|
|
320
|
-
constitution=constitution,
|
|
321
|
-
profiles=profiles,
|
|
322
|
-
architecture=architecture,
|
|
323
319
|
warnings=warnings,
|
|
324
320
|
)
|
|
325
321
|
)
|
|
@@ -348,15 +344,6 @@ class SpecWorkflow:
|
|
|
348
344
|
)
|
|
349
345
|
|
|
350
346
|
self.manager.materialize_context(prepared)
|
|
351
|
-
self._materialize_decision_context(
|
|
352
|
-
prepared=prepared,
|
|
353
|
-
config=config,
|
|
354
|
-
project=project,
|
|
355
|
-
profiles=profiles,
|
|
356
|
-
constitution=constitution,
|
|
357
|
-
architecture=architecture,
|
|
358
|
-
discovery=discovery,
|
|
359
|
-
)
|
|
360
347
|
|
|
361
348
|
if not discovery.is_complete:
|
|
362
349
|
return self._build_result(
|
|
@@ -510,17 +497,6 @@ class SpecWorkflow:
|
|
|
510
497
|
)
|
|
511
498
|
|
|
512
499
|
context_path = self.manager.materialize_context(prepared)
|
|
513
|
-
decision_context_path, decision_context_digest = (
|
|
514
|
-
self._materialize_decision_context(
|
|
515
|
-
prepared=prepared,
|
|
516
|
-
config=config,
|
|
517
|
-
project=project,
|
|
518
|
-
profiles=profiles,
|
|
519
|
-
constitution=constitution,
|
|
520
|
-
architecture=architecture,
|
|
521
|
-
discovery=discovery,
|
|
522
|
-
)
|
|
523
|
-
)
|
|
524
500
|
prompt = build_spec_prompt(
|
|
525
501
|
request=description,
|
|
526
502
|
project_name=project.name,
|
|
@@ -555,9 +531,6 @@ class SpecWorkflow:
|
|
|
555
531
|
else ""
|
|
556
532
|
),
|
|
557
533
|
discovery_digest=discovery_digest,
|
|
558
|
-
discovery_decisions=list(discovery.decisions()),
|
|
559
|
-
decision_context_path=self._relative(config, decision_context_path),
|
|
560
|
-
decision_context_digest=decision_context_digest,
|
|
561
534
|
)
|
|
562
535
|
|
|
563
536
|
output_path = (
|
|
@@ -623,15 +596,6 @@ class SpecWorkflow:
|
|
|
623
596
|
spec_id=prepared.spec_id,
|
|
624
597
|
)
|
|
625
598
|
self.manager.materialize_context(prepared)
|
|
626
|
-
self._materialize_decision_context(
|
|
627
|
-
prepared=prepared,
|
|
628
|
-
config=config,
|
|
629
|
-
project=project,
|
|
630
|
-
profiles=profiles,
|
|
631
|
-
constitution=constitution,
|
|
632
|
-
architecture=architecture,
|
|
633
|
-
discovery=discovery,
|
|
634
|
-
)
|
|
635
599
|
warnings.append(
|
|
636
600
|
"the specification agent found decisions that were not "
|
|
637
601
|
"answered during Discovery. They were added to discovery.yaml "
|
|
@@ -726,9 +690,6 @@ class SpecWorkflow:
|
|
|
726
690
|
language: str,
|
|
727
691
|
config: DevFlowConfig,
|
|
728
692
|
project: Project,
|
|
729
|
-
constitution: Constitution,
|
|
730
|
-
profiles: list[Profile],
|
|
731
|
-
architecture: ArchitectureManifest | None,
|
|
732
693
|
warnings: list[str],
|
|
733
694
|
) -> tuple[DiscoveryDocument, str, bool]:
|
|
734
695
|
context_path = self.manager.materialize_context(prepared)
|
|
@@ -738,17 +699,6 @@ class SpecWorkflow:
|
|
|
738
699
|
prepared.directory,
|
|
739
700
|
)
|
|
740
701
|
backlog_before = len(discovery.pending_material)
|
|
741
|
-
decision_context_path, decision_context_digest = (
|
|
742
|
-
self._materialize_decision_context(
|
|
743
|
-
prepared=prepared,
|
|
744
|
-
config=config,
|
|
745
|
-
project=project,
|
|
746
|
-
profiles=profiles,
|
|
747
|
-
constitution=constitution,
|
|
748
|
-
architecture=architecture,
|
|
749
|
-
discovery=discovery,
|
|
750
|
-
)
|
|
751
|
-
)
|
|
752
702
|
spec_existed = prepared.path.exists()
|
|
753
703
|
settings = config.discovery
|
|
754
704
|
prompt = build_discovery_prompt(
|
|
@@ -767,11 +717,6 @@ class SpecWorkflow:
|
|
|
767
717
|
question_budget_maximum=settings.question_budget_maximum,
|
|
768
718
|
max_rounds=settings.max_rounds,
|
|
769
719
|
assumptions_enabled=settings.assumptions_enabled,
|
|
770
|
-
decision_context_path=self._relative(
|
|
771
|
-
config,
|
|
772
|
-
decision_context_path,
|
|
773
|
-
),
|
|
774
|
-
decision_context_digest=decision_context_digest,
|
|
775
720
|
)
|
|
776
721
|
run_context = RunContext(
|
|
777
722
|
root=config.root,
|
|
@@ -835,54 +780,8 @@ class SpecWorkflow:
|
|
|
835
780
|
"Critical or material decisions are never converted into "
|
|
836
781
|
"assumptions to close Discovery."
|
|
837
782
|
)
|
|
838
|
-
self._materialize_decision_context(
|
|
839
|
-
prepared=prepared,
|
|
840
|
-
config=config,
|
|
841
|
-
project=project,
|
|
842
|
-
profiles=profiles,
|
|
843
|
-
constitution=constitution,
|
|
844
|
-
architecture=architecture,
|
|
845
|
-
discovery=updated,
|
|
846
|
-
)
|
|
847
783
|
return updated, digest, digest != original_digest
|
|
848
784
|
|
|
849
|
-
def _materialize_decision_context(
|
|
850
|
-
self,
|
|
851
|
-
*,
|
|
852
|
-
prepared: PreparedSpec,
|
|
853
|
-
config: DevFlowConfig,
|
|
854
|
-
project: Project,
|
|
855
|
-
profiles: list[Profile],
|
|
856
|
-
constitution: Constitution,
|
|
857
|
-
architecture: ArchitectureManifest | None,
|
|
858
|
-
discovery: DiscoveryDocument,
|
|
859
|
-
) -> tuple[Path, str]:
|
|
860
|
-
"""Write the deterministic decision context for Discovery and specs."""
|
|
861
|
-
content = build_decision_context(
|
|
862
|
-
project_name=project.name,
|
|
863
|
-
project_type=project.project_type,
|
|
864
|
-
project_mode=discovery.project_mode,
|
|
865
|
-
languages=project.languages,
|
|
866
|
-
frameworks=project.frameworks,
|
|
867
|
-
databases=project.databases,
|
|
868
|
-
profiles=tuple(profile.name for profile in profiles),
|
|
869
|
-
constitution_files=tuple(
|
|
870
|
-
document.name for document in constitution.documents
|
|
871
|
-
),
|
|
872
|
-
architecture_path=(
|
|
873
|
-
architecture.relative_path(config.root)
|
|
874
|
-
if architecture is not None
|
|
875
|
-
else ""
|
|
876
|
-
),
|
|
877
|
-
architecture_style=(
|
|
878
|
-
architecture.style if architecture is not None else ""
|
|
879
|
-
),
|
|
880
|
-
discovery=discovery,
|
|
881
|
-
)
|
|
882
|
-
path = prepared.directory / "decision-context.md"
|
|
883
|
-
digest = ArtifactStore(prepared.root).write(path, content)
|
|
884
|
-
return path, digest
|
|
885
|
-
|
|
886
785
|
@staticmethod
|
|
887
786
|
def _effective_batch_size(
|
|
888
787
|
adapter: HarnessPort,
|