devflow-toolkit 0.3.4__tar.gz → 0.3.6__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.4 → devflow_toolkit-0.3.6}/CHANGELOG.md +31 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/PKG-INFO +30 -7
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/README.md +29 -6
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/pyproject.toml +1 -1
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/agents.py +3 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/claude_code.py +11 -3
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/codex.py +11 -3
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/instructions.py +95 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/kiro.py +16 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/opencode.py +16 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/cli.py +1 -1
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/approve.py +1 -1
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/harness.py +42 -8
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/spec.py +2 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/project.py +132 -9
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/ai-rag/profile.yaml +3 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_cli.py +78 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_hardening.py +16 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_harness_adapters.py +104 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/.gitignore +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/LICENSE +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/base.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/detector.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/adapters/registry.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/doctor.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/init.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/recover.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/commands/status.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/architecture.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/artifacts/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/artifacts/errors.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/artifacts/models.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/artifacts/store.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/clock.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/config.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/constitution.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/discovery.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/ports.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/profile_manager.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/recovery.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/spec_workflow.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/specification.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/errors.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/events.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/locator.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/lock.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/manager.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/models.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/core/state/transitions.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/models/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/models/profile.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/models/project.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/base/constitution/architecture.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/base/constitution/constitution.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/base/profile.yaml +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/django-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/prompts/__init__.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/prompts/discovery.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/prompts/spec.greenfield.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/src/devflow/prompts/spec.md +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_discovery.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_event_log.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_greenfield.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_recovery.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_spec_workflow.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_state.py +0 -0
- {devflow_toolkit-0.3.4 → devflow_toolkit-0.3.6}/tests/test_state_replay.py +0 -0
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to DevFlow Toolkit are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.3.6 - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Stack detection now reads packages installed in a local virtual
|
|
10
|
+
environment (`.venv`, `venv` or `env`) when dependency manifests are
|
|
11
|
+
absent. Django, FastAPI and the RAG/vector stack can therefore be
|
|
12
|
+
detected without versioning `requirements.txt` or `pyproject.toml`.
|
|
13
|
+
- RAG detection recognizes `qdrant-client`, `weaviate-client`,
|
|
14
|
+
`pinecone-client` and `pgvector`, including the `vector-database`
|
|
15
|
+
capability and the `ai-rag` profile.
|
|
16
|
+
- Generated harness integration files are added to a managed block in
|
|
17
|
+
`.gitignore`. Existing entries are preserved, the block is shared
|
|
18
|
+
across harnesses, and unmanaged user files are never ignored.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Package version is `0.3.6`.
|
|
23
|
+
|
|
24
|
+
## 0.3.5 - 2026-11-04
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Interactive `devflow spec` now asks which installed agent harness to
|
|
29
|
+
use even when `.devflow/config.yaml` already names one. Previously it
|
|
30
|
+
started the configured harness directly, so `--harness` had to be
|
|
31
|
+
passed to make a different choice. The configured harness is offered
|
|
32
|
+
as the prompt default. Pass `--harness <name>` to skip the prompt or
|
|
33
|
+
`--no-agent` to use deterministic analysis.
|
|
34
|
+
- Package version is `0.3.5`.
|
|
35
|
+
|
|
5
36
|
## 0.3.4 - 2026-11-04
|
|
6
37
|
|
|
7
38
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: devflow-toolkit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Specification workflow toolkit for AI-assisted software changes
|
|
5
5
|
Author: DevFlow contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -42,7 +42,7 @@ anyone starts implementing it. DevFlow owns the workflow state; the
|
|
|
42
42
|
selected agent harness is only the execution backend that drafts the
|
|
43
43
|
specification.
|
|
44
44
|
|
|
45
|
-
This is the `0.3.
|
|
45
|
+
This is the `0.3.6` MVP. It implements the **discovery and
|
|
46
46
|
specification stages only**. It supports two specification contexts:
|
|
47
47
|
**Existing Project** (the default) and **Greenfield**. It is not a
|
|
48
48
|
complete SDD platform and does not include planning, implementation or
|
|
@@ -118,7 +118,7 @@ pip install devflow-toolkit
|
|
|
118
118
|
To install a specific built artifact instead:
|
|
119
119
|
|
|
120
120
|
```bash
|
|
121
|
-
pip install devflow_toolkit-0.3.
|
|
121
|
+
pip install devflow_toolkit-0.3.6-py3-none-any.whl
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
Verify the installation:
|
|
@@ -142,6 +142,15 @@ copies the applicable constitution documents, writes
|
|
|
142
142
|
`.devflow/config.yaml` and generates the integration for the selected
|
|
143
143
|
harness.
|
|
144
144
|
|
|
145
|
+
The stack is detected from `pyproject.toml`, `requirements*.txt` and
|
|
146
|
+
`package.json`. When those manifests are absent or incomplete, DevFlow
|
|
147
|
+
also reads the packages installed in a local virtual environment
|
|
148
|
+
(`.venv`, `venv` or `env`). This keeps Django, FastAPI and the
|
|
149
|
+
RAG/vector stack (`langchain`, `llama-index`, `chromadb`,
|
|
150
|
+
`qdrant-client`, `weaviate-client`, `pinecone-client`, `pgvector` and
|
|
151
|
+
`sentence-transformers`) detectable without versioning a dependency
|
|
152
|
+
manifest.
|
|
153
|
+
|
|
145
154
|
Common options:
|
|
146
155
|
|
|
147
156
|
```bash
|
|
@@ -282,7 +291,7 @@ as an architectural constraint when it is present.
|
|
|
282
291
|
|
|
283
292
|
### Harnesses
|
|
284
293
|
|
|
285
|
-
| Harness | Status in 0.3.
|
|
294
|
+
| Harness | Status in 0.3.6 |
|
|
286
295
|
| --- | --- |
|
|
287
296
|
| OpenCode | Verified end-to-end in non-interactive mode |
|
|
288
297
|
| Codex | Integration files are generated, but not verified for this release |
|
|
@@ -308,6 +317,14 @@ also select the model used by the agent, for example:
|
|
|
308
317
|
DevFlow creates `opencode.json` only when it does not exist and never
|
|
309
318
|
replaces an existing OpenCode configuration.
|
|
310
319
|
|
|
320
|
+
DevFlow records the files it generates for the selected harness in a
|
|
321
|
+
managed block inside `.gitignore`, for example `CLAUDE.md`, `AGENTS.md`,
|
|
322
|
+
`opencode.json` and the DevFlow agents. Existing ignore entries are
|
|
323
|
+
preserved, and the block is shared across harnesses, so switching
|
|
324
|
+
adapters keeps earlier generated files ignored. Unmanaged files that
|
|
325
|
+
DevFlow did not create are never added. DevFlow does not ignore
|
|
326
|
+
`.devflow/` or the constitution.
|
|
327
|
+
|
|
311
328
|
### Permissions
|
|
312
329
|
|
|
313
330
|
`allow_workflow_write` controls writes to DevFlow artifacts.
|
|
@@ -432,7 +449,7 @@ specification that still lists open questions.
|
|
|
432
449
|
8. If artifacts exist without workflow state, diagnose with
|
|
433
450
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
434
451
|
|
|
435
|
-
Available commands in `0.3.
|
|
452
|
+
Available commands in `0.3.6`:
|
|
436
453
|
|
|
437
454
|
| Command | Status |
|
|
438
455
|
| --- | --- |
|
|
@@ -493,6 +510,12 @@ devflow spec "Add a GET /patients endpoint"
|
|
|
493
510
|
devflow spec --continue 006 . --harness opencode
|
|
494
511
|
```
|
|
495
512
|
|
|
513
|
+
When no `--harness` is passed, an interactive `devflow spec` asks which
|
|
514
|
+
installed harness to use before starting, even if `.devflow/config.yaml`
|
|
515
|
+
already names one. The configured harness is offered as the default.
|
|
516
|
+
Pass `--harness <name>` to skip the prompt, or `--no-agent` to use
|
|
517
|
+
deterministic static analysis.
|
|
518
|
+
|
|
496
519
|
Use `--auto` to run both phases in a single invocation, as earlier
|
|
497
520
|
releases did:
|
|
498
521
|
|
|
@@ -614,7 +637,7 @@ devflow approve 001 --stage spec
|
|
|
614
637
|
```
|
|
615
638
|
|
|
616
639
|
Approval is explicit and binds the decision to the current artifact
|
|
617
|
-
digests. For a `0.3.
|
|
640
|
+
digests. For a `0.3.6` change it binds `spec.md`, `discovery.yaml` and,
|
|
618
641
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
619
642
|
same approval is a no-op. If an artifact changes after validation,
|
|
620
643
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -625,7 +648,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
625
648
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
626
649
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
627
650
|
|
|
628
|
-
Only the `spec` stage is available in `0.3.
|
|
651
|
+
Only the `spec` stage is available in `0.3.6`. `--stage plan` and
|
|
629
652
|
`--stage review` are rejected. There are no `plan`, `implement` or
|
|
630
653
|
`review` commands in this release.
|
|
631
654
|
|
|
@@ -10,7 +10,7 @@ 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.6` 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
|
|
@@ -86,7 +86,7 @@ pip install devflow-toolkit
|
|
|
86
86
|
To install a specific built artifact instead:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
pip install devflow_toolkit-0.3.
|
|
89
|
+
pip install devflow_toolkit-0.3.6-py3-none-any.whl
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Verify the installation:
|
|
@@ -110,6 +110,15 @@ copies the applicable constitution documents, writes
|
|
|
110
110
|
`.devflow/config.yaml` and generates the integration for the selected
|
|
111
111
|
harness.
|
|
112
112
|
|
|
113
|
+
The stack is detected from `pyproject.toml`, `requirements*.txt` and
|
|
114
|
+
`package.json`. When those manifests are absent or incomplete, DevFlow
|
|
115
|
+
also reads the packages installed in a local virtual environment
|
|
116
|
+
(`.venv`, `venv` or `env`). This keeps Django, FastAPI and the
|
|
117
|
+
RAG/vector stack (`langchain`, `llama-index`, `chromadb`,
|
|
118
|
+
`qdrant-client`, `weaviate-client`, `pinecone-client`, `pgvector` and
|
|
119
|
+
`sentence-transformers`) detectable without versioning a dependency
|
|
120
|
+
manifest.
|
|
121
|
+
|
|
113
122
|
Common options:
|
|
114
123
|
|
|
115
124
|
```bash
|
|
@@ -250,7 +259,7 @@ as an architectural constraint when it is present.
|
|
|
250
259
|
|
|
251
260
|
### Harnesses
|
|
252
261
|
|
|
253
|
-
| Harness | Status in 0.3.
|
|
262
|
+
| Harness | Status in 0.3.6 |
|
|
254
263
|
| --- | --- |
|
|
255
264
|
| OpenCode | Verified end-to-end in non-interactive mode |
|
|
256
265
|
| Codex | Integration files are generated, but not verified for this release |
|
|
@@ -276,6 +285,14 @@ also select the model used by the agent, for example:
|
|
|
276
285
|
DevFlow creates `opencode.json` only when it does not exist and never
|
|
277
286
|
replaces an existing OpenCode configuration.
|
|
278
287
|
|
|
288
|
+
DevFlow records the files it generates for the selected harness in a
|
|
289
|
+
managed block inside `.gitignore`, for example `CLAUDE.md`, `AGENTS.md`,
|
|
290
|
+
`opencode.json` and the DevFlow agents. Existing ignore entries are
|
|
291
|
+
preserved, and the block is shared across harnesses, so switching
|
|
292
|
+
adapters keeps earlier generated files ignored. Unmanaged files that
|
|
293
|
+
DevFlow did not create are never added. DevFlow does not ignore
|
|
294
|
+
`.devflow/` or the constitution.
|
|
295
|
+
|
|
279
296
|
### Permissions
|
|
280
297
|
|
|
281
298
|
`allow_workflow_write` controls writes to DevFlow artifacts.
|
|
@@ -400,7 +417,7 @@ specification that still lists open questions.
|
|
|
400
417
|
8. If artifacts exist without workflow state, diagnose with
|
|
401
418
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
402
419
|
|
|
403
|
-
Available commands in `0.3.
|
|
420
|
+
Available commands in `0.3.6`:
|
|
404
421
|
|
|
405
422
|
| Command | Status |
|
|
406
423
|
| --- | --- |
|
|
@@ -461,6 +478,12 @@ devflow spec "Add a GET /patients endpoint"
|
|
|
461
478
|
devflow spec --continue 006 . --harness opencode
|
|
462
479
|
```
|
|
463
480
|
|
|
481
|
+
When no `--harness` is passed, an interactive `devflow spec` asks which
|
|
482
|
+
installed harness to use before starting, even if `.devflow/config.yaml`
|
|
483
|
+
already names one. The configured harness is offered as the default.
|
|
484
|
+
Pass `--harness <name>` to skip the prompt, or `--no-agent` to use
|
|
485
|
+
deterministic static analysis.
|
|
486
|
+
|
|
464
487
|
Use `--auto` to run both phases in a single invocation, as earlier
|
|
465
488
|
releases did:
|
|
466
489
|
|
|
@@ -582,7 +605,7 @@ devflow approve 001 --stage spec
|
|
|
582
605
|
```
|
|
583
606
|
|
|
584
607
|
Approval is explicit and binds the decision to the current artifact
|
|
585
|
-
digests. For a `0.3.
|
|
608
|
+
digests. For a `0.3.6` change it binds `spec.md`, `discovery.yaml` and,
|
|
586
609
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
587
610
|
same approval is a no-op. If an artifact changes after validation,
|
|
588
611
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -593,7 +616,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
593
616
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
594
617
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
595
618
|
|
|
596
|
-
Only the `spec` stage is available in `0.3.
|
|
619
|
+
Only the `spec` stage is available in `0.3.6`. `--stage plan` and
|
|
597
620
|
`--stage review` are rejected. There are no `plan`, `implement` or
|
|
598
621
|
`review` commands in this release.
|
|
599
622
|
|
|
@@ -8,6 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
from devflow.adapters.instructions import (
|
|
9
9
|
MANAGED_MARKER as _MANAGED_MARKER,
|
|
10
10
|
render_agent_instructions,
|
|
11
|
+
write_gitignore_entries,
|
|
11
12
|
write_text_managed,
|
|
12
13
|
)
|
|
13
14
|
from devflow.core.config import DevFlowConfig
|
|
@@ -46,4 +47,6 @@ class AgentsFileWriter:
|
|
|
46
47
|
def write(self, root: Path, content: str) -> AgentsWriteResult:
|
|
47
48
|
"""Write AGENTS.md without overwriting unmanaged user content."""
|
|
48
49
|
result = write_text_managed(root / "AGENTS.md", content, root=root)
|
|
50
|
+
if result.status != "skipped":
|
|
51
|
+
write_gitignore_entries(root, ("AGENTS.md",))
|
|
49
52
|
return AgentsWriteResult(path=result.path, status=result.status)
|
|
@@ -14,6 +14,7 @@ from devflow.adapters.base import (
|
|
|
14
14
|
)
|
|
15
15
|
from devflow.adapters.instructions import (
|
|
16
16
|
render_agent_instructions,
|
|
17
|
+
write_gitignore_entries,
|
|
17
18
|
write_text_managed,
|
|
18
19
|
)
|
|
19
20
|
|
|
@@ -38,9 +39,16 @@ class ClaudeCodeAdapter(HarnessAdapter):
|
|
|
38
39
|
content,
|
|
39
40
|
root=context.root,
|
|
40
41
|
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
changes = [FileChange(path=result.path, status=result.status)]
|
|
43
|
+
if result.status != "skipped":
|
|
44
|
+
ignored = write_gitignore_entries(
|
|
45
|
+
context.root,
|
|
46
|
+
("CLAUDE.md",),
|
|
47
|
+
)
|
|
48
|
+
changes.append(
|
|
49
|
+
FileChange(path=ignored.path, status=ignored.status)
|
|
50
|
+
)
|
|
51
|
+
return SetupResult(changes=tuple(changes))
|
|
44
52
|
|
|
45
53
|
def build_run(self, context: RunContext) -> Invocation:
|
|
46
54
|
settings = json.dumps(
|
|
@@ -12,6 +12,7 @@ from devflow.adapters.base import (
|
|
|
12
12
|
)
|
|
13
13
|
from devflow.adapters.instructions import (
|
|
14
14
|
render_agent_instructions,
|
|
15
|
+
write_gitignore_entries,
|
|
15
16
|
write_text_managed,
|
|
16
17
|
)
|
|
17
18
|
|
|
@@ -35,9 +36,16 @@ class CodexAdapter(HarnessAdapter):
|
|
|
35
36
|
content,
|
|
36
37
|
root=context.root,
|
|
37
38
|
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
changes = [FileChange(path=result.path, status=result.status)]
|
|
40
|
+
if result.status != "skipped":
|
|
41
|
+
ignored = write_gitignore_entries(
|
|
42
|
+
context.root,
|
|
43
|
+
("AGENTS.md",),
|
|
44
|
+
)
|
|
45
|
+
changes.append(
|
|
46
|
+
FileChange(path=ignored.path, status=ignored.status)
|
|
47
|
+
)
|
|
48
|
+
return SetupResult(changes=tuple(changes))
|
|
41
49
|
|
|
42
50
|
def build_run(self, context: RunContext) -> Invocation:
|
|
43
51
|
root = context.root
|
|
@@ -6,6 +6,7 @@ import json
|
|
|
6
6
|
import os
|
|
7
7
|
import stat
|
|
8
8
|
import tempfile
|
|
9
|
+
from collections.abc import Sequence
|
|
9
10
|
from dataclasses import dataclass
|
|
10
11
|
from pathlib import Path
|
|
11
12
|
from typing import Any
|
|
@@ -15,6 +16,8 @@ from devflow.models.profile import Profile
|
|
|
15
16
|
from devflow.models.project import Project
|
|
16
17
|
|
|
17
18
|
MANAGED_MARKER = "<!-- devflow:managed -->"
|
|
19
|
+
GITIGNORE_BEGIN = "# devflow:managed:begin"
|
|
20
|
+
GITIGNORE_END = "# devflow:managed:end"
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
class ManagedWriteError(OSError):
|
|
@@ -261,3 +264,95 @@ def write_json_if_missing(
|
|
|
261
264
|
target = _managed_path(root, target)
|
|
262
265
|
_write_atomic(target, json.dumps(data, indent=2) + "\n")
|
|
263
266
|
return ManagedWriteResult(path=target, status="created")
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def _normalize_gitignore_entries(entries: Sequence[str]) -> list[str]:
|
|
270
|
+
"""Return unique, root-anchored ignore patterns."""
|
|
271
|
+
normalized: list[str] = []
|
|
272
|
+
for entry in entries:
|
|
273
|
+
value = str(entry).strip()
|
|
274
|
+
if not value or value.startswith("#"):
|
|
275
|
+
continue
|
|
276
|
+
if not value.startswith("/"):
|
|
277
|
+
value = f"/{value}"
|
|
278
|
+
if value not in normalized:
|
|
279
|
+
normalized.append(value)
|
|
280
|
+
return normalized
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def _render_gitignore_block(entries: Sequence[str]) -> str:
|
|
284
|
+
"""Render the managed .gitignore block."""
|
|
285
|
+
lines = [
|
|
286
|
+
GITIGNORE_BEGIN,
|
|
287
|
+
"# Generated by DevFlow for agent harness integration.",
|
|
288
|
+
*entries,
|
|
289
|
+
GITIGNORE_END,
|
|
290
|
+
]
|
|
291
|
+
return "\n".join(lines) + "\n"
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def write_gitignore_entries(
|
|
295
|
+
root: Path,
|
|
296
|
+
entries: Sequence[str],
|
|
297
|
+
) -> ManagedWriteResult:
|
|
298
|
+
"""Ignore DevFlow-generated harness files inside a managed block.
|
|
299
|
+
|
|
300
|
+
Existing user entries are preserved. Patterns already inside the
|
|
301
|
+
managed block are kept when the selected harness changes.
|
|
302
|
+
"""
|
|
303
|
+
path = root / ".gitignore"
|
|
304
|
+
desired = _normalize_gitignore_entries(entries)
|
|
305
|
+
if not desired:
|
|
306
|
+
return ManagedWriteResult(path=path, status="skipped")
|
|
307
|
+
if path.is_symlink():
|
|
308
|
+
return ManagedWriteResult(path=path, status="skipped")
|
|
309
|
+
|
|
310
|
+
target = _managed_path(root, path)
|
|
311
|
+
if not target.exists():
|
|
312
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
313
|
+
_write_atomic(target, _render_gitignore_block(desired))
|
|
314
|
+
return ManagedWriteResult(path=target, status="created")
|
|
315
|
+
|
|
316
|
+
try:
|
|
317
|
+
existing = target.read_text(encoding="utf-8")
|
|
318
|
+
except OSError:
|
|
319
|
+
return ManagedWriteResult(path=target, status="skipped")
|
|
320
|
+
|
|
321
|
+
begin = existing.find(GITIGNORE_BEGIN)
|
|
322
|
+
end = existing.find(GITIGNORE_END)
|
|
323
|
+
if begin == -1 and end == -1:
|
|
324
|
+
prefix = existing
|
|
325
|
+
if prefix and not prefix.endswith("\n"):
|
|
326
|
+
prefix += "\n"
|
|
327
|
+
if prefix:
|
|
328
|
+
prefix += "\n"
|
|
329
|
+
updated = prefix + _render_gitignore_block(desired)
|
|
330
|
+
elif begin == -1 or end == -1 or end < begin:
|
|
331
|
+
return ManagedWriteResult(path=target, status="skipped")
|
|
332
|
+
else:
|
|
333
|
+
current = existing[
|
|
334
|
+
begin + len(GITIGNORE_BEGIN) : end
|
|
335
|
+
].splitlines()
|
|
336
|
+
merged = _normalize_gitignore_entries(
|
|
337
|
+
[
|
|
338
|
+
line
|
|
339
|
+
for line in current
|
|
340
|
+
if line.strip() and not line.strip().startswith("#")
|
|
341
|
+
]
|
|
342
|
+
+ desired
|
|
343
|
+
)
|
|
344
|
+
suffix = existing[end + len(GITIGNORE_END) :]
|
|
345
|
+
if suffix.startswith("\r\n"):
|
|
346
|
+
suffix = suffix[2:]
|
|
347
|
+
elif suffix.startswith("\n"):
|
|
348
|
+
suffix = suffix[1:]
|
|
349
|
+
updated = (
|
|
350
|
+
existing[:begin]
|
|
351
|
+
+ _render_gitignore_block(merged)
|
|
352
|
+
+ suffix
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
if updated == existing:
|
|
356
|
+
return ManagedWriteResult(path=target, status="unchanged")
|
|
357
|
+
_write_atomic(target, updated)
|
|
358
|
+
return ManagedWriteResult(path=target, status="updated")
|
|
@@ -13,6 +13,7 @@ from devflow.adapters.base import (
|
|
|
13
13
|
from devflow.adapters.instructions import (
|
|
14
14
|
MANAGED_MARKER,
|
|
15
15
|
render_agent_instructions,
|
|
16
|
+
write_gitignore_entries,
|
|
16
17
|
write_json_managed,
|
|
17
18
|
write_text_managed,
|
|
18
19
|
)
|
|
@@ -31,6 +32,7 @@ class KiroAdapter(HarnessAdapter):
|
|
|
31
32
|
def setup(self, context: SetupContext) -> SetupResult:
|
|
32
33
|
changes: list[FileChange] = []
|
|
33
34
|
warnings: list[str] = []
|
|
35
|
+
ignored: list[str] = []
|
|
34
36
|
|
|
35
37
|
steering = context.root / ".kiro" / "steering"
|
|
36
38
|
for document in context.constitution.documents:
|
|
@@ -41,6 +43,8 @@ class KiroAdapter(HarnessAdapter):
|
|
|
41
43
|
root=context.root,
|
|
42
44
|
)
|
|
43
45
|
changes.append(FileChange(path=result.path, status=result.status))
|
|
46
|
+
if result.status != "skipped":
|
|
47
|
+
ignored.append(f".kiro/steering/devflow-{document.name}")
|
|
44
48
|
if result.status == "skipped":
|
|
45
49
|
warnings.append(
|
|
46
50
|
f"Kiro steering file {result.path.relative_to(context.root)} "
|
|
@@ -64,6 +68,8 @@ class KiroAdapter(HarnessAdapter):
|
|
|
64
68
|
status=workflow_result.status,
|
|
65
69
|
)
|
|
66
70
|
)
|
|
71
|
+
if workflow_result.status != "skipped":
|
|
72
|
+
ignored.append(".kiro/steering/devflow-spec-workflow.md")
|
|
67
73
|
|
|
68
74
|
agents = context.root / ".kiro" / "agents"
|
|
69
75
|
interactive = write_json_managed(
|
|
@@ -94,6 +100,16 @@ class KiroAdapter(HarnessAdapter):
|
|
|
94
100
|
"and was left untouched."
|
|
95
101
|
)
|
|
96
102
|
|
|
103
|
+
if interactive.status != "skipped":
|
|
104
|
+
ignored.append(f".kiro/agents/{INTERACTIVE_AGENT}.json")
|
|
105
|
+
if readonly.status != "skipped":
|
|
106
|
+
ignored.append(f".kiro/agents/{READONLY_AGENT}.json")
|
|
107
|
+
if ignored:
|
|
108
|
+
gitignore = write_gitignore_entries(context.root, ignored)
|
|
109
|
+
changes.append(
|
|
110
|
+
FileChange(path=gitignore.path, status=gitignore.status)
|
|
111
|
+
)
|
|
112
|
+
|
|
97
113
|
return SetupResult(changes=tuple(changes), warnings=tuple(warnings))
|
|
98
114
|
|
|
99
115
|
def build_run(self, context: RunContext) -> Invocation:
|
|
@@ -15,6 +15,7 @@ from devflow.adapters.base import (
|
|
|
15
15
|
from devflow.adapters.instructions import (
|
|
16
16
|
MANAGED_MARKER,
|
|
17
17
|
render_agent_instructions,
|
|
18
|
+
write_gitignore_entries,
|
|
18
19
|
write_json_if_missing,
|
|
19
20
|
write_text_managed,
|
|
20
21
|
)
|
|
@@ -91,6 +92,21 @@ class OpenCodeAdapter(HarnessAdapter):
|
|
|
91
92
|
FileChange(path=readonly.path, status=readonly.status)
|
|
92
93
|
)
|
|
93
94
|
|
|
95
|
+
ignored: list[str] = []
|
|
96
|
+
if result.status != "skipped":
|
|
97
|
+
ignored.append("AGENTS.md")
|
|
98
|
+
if config_result.status != "skipped":
|
|
99
|
+
ignored.append("opencode.json")
|
|
100
|
+
if interactive.status != "skipped":
|
|
101
|
+
ignored.append(f".opencode/agents/{INTERACTIVE_AGENT}.md")
|
|
102
|
+
if readonly.status != "skipped":
|
|
103
|
+
ignored.append(f".opencode/agents/{READONLY_AGENT}.md")
|
|
104
|
+
if ignored:
|
|
105
|
+
gitignore = write_gitignore_entries(context.root, ignored)
|
|
106
|
+
changes.append(
|
|
107
|
+
FileChange(path=gitignore.path, status=gitignore.status)
|
|
108
|
+
)
|
|
109
|
+
|
|
94
110
|
if result.status == "skipped":
|
|
95
111
|
warnings.append(
|
|
96
112
|
"AGENTS.md contains unmanaged content and was left untouched."
|
|
@@ -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.6. "
|
|
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
|
|