devflow-toolkit 0.4.1__tar.gz → 0.4.3__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.4.1 → devflow_toolkit-0.4.3}/CHANGELOG.md +38 -4
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/PKG-INFO +27 -11
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/README.md +4 -1
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/docs/PRESENTATION.md +12 -11
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/docs/REFERENCE.md +26 -10
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/pyproject.toml +1 -1
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/config.py +3 -27
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/discovery.py +48 -6
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/prompts/__init__.py +13 -2
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/prompts/discovery.md +16 -1
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/prompts/spec.md +6 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_cli.py +5 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_discovery.py +51 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_discovery_decisions.py +20 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_spec_workflow.py +31 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/.gitignore +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/LICENSE +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/docs/PUBLISHING.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/agents.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/antigravity.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/base.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/claude_code.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/codex.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/detector.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/instructions.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/kiro.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/opencode.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/adapters/registry.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/cli.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/approve.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/config.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/doctor.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/harness.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/init.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/recover.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/reopen.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/security.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/spec.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/commands/status.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/architecture.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/artifacts/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/artifacts/errors.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/artifacts/models.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/artifacts/store.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/clock.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/constitution.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/file_types.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/ports.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/profile_manager.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/project.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/recovery.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/security_baseline.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/security_tools.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/spec_workflow.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/specification.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/errors.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/events.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/locator.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/lock.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/manager.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/models.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/core/state/transitions.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/hooks/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/hooks/claude_guard.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/models/__init__.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/models/profile.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/models/project.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/base/constitution/architecture.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/base/constitution/constitution.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/base/profile.yaml +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/django-backend/profile.yaml +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/prompts/discovery-repair.md +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_event_log.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_greenfield.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_hardening.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_harness_adapters.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_recovery.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_security_baseline.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_security_tools.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/tests/test_state.py +0 -0
- {devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/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.4.3 - 2026-11-10
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- The planner's authentication question fits the project: Django
|
|
10
|
+
sessions with the built-in views and forms for Django projects,
|
|
11
|
+
server-side sessions for others, and API-token options only when the
|
|
12
|
+
request mentions an API, tokens or a mobile client.
|
|
13
|
+
- A pending question that nobody has answered, including the ones
|
|
14
|
+
DevFlow generates, is a proposal: the Discovery agent may rewrite its
|
|
15
|
+
wording and options, put the recommended option first and add a
|
|
16
|
+
`next_level`. Answered decisions are never rewritten.
|
|
17
|
+
- Discovery and specification agents search only the project's own
|
|
18
|
+
files and skip virtual environments and installed dependencies,
|
|
19
|
+
reading a dependency only for one specific fact.
|
|
20
|
+
- Every prompt opens with the language rule, so the agent answers in
|
|
21
|
+
the configured language from its first message.
|
|
22
|
+
|
|
23
|
+
### Package
|
|
24
|
+
|
|
25
|
+
- Package version is `0.4.3`, published on TestPyPI and PyPI.
|
|
26
|
+
|
|
27
|
+
## 0.4.2 - 2026-11-10
|
|
28
|
+
|
|
29
|
+
### Removed
|
|
30
|
+
|
|
31
|
+
- `devflow init` no longer creates the empty `.devflow/plans/` and
|
|
32
|
+
`.devflow/templates/` folders, and no longer writes `plans` and
|
|
33
|
+
`templates` in `config.yaml`. Nothing used them. Older configuration
|
|
34
|
+
files that contain those keys still load; the keys are ignored and
|
|
35
|
+
existing folders are left untouched.
|
|
36
|
+
|
|
37
|
+
### Package
|
|
38
|
+
|
|
39
|
+
- Package version is `0.4.2`, published on TestPyPI and PyPI.
|
|
40
|
+
|
|
5
41
|
## 0.4.1 - 2026-11-10
|
|
6
42
|
|
|
7
43
|
### Changed
|
|
@@ -27,8 +63,7 @@ All notable changes to DevFlow Toolkit are documented in this file.
|
|
|
27
63
|
|
|
28
64
|
### Package
|
|
29
65
|
|
|
30
|
-
- Package version is `0.4.1
|
|
31
|
-
`0.3.28`.
|
|
66
|
+
- Package version is `0.4.1`, published on TestPyPI and PyPI.
|
|
32
67
|
|
|
33
68
|
## 0.4.0 - 2026-11-10
|
|
34
69
|
|
|
@@ -67,8 +102,7 @@ All notable changes to DevFlow Toolkit are documented in this file.
|
|
|
67
102
|
|
|
68
103
|
### Package
|
|
69
104
|
|
|
70
|
-
- Package version is `0.4.0
|
|
71
|
-
`0.3.28`.
|
|
105
|
+
- Package version is `0.4.0`, published on TestPyPI only.
|
|
72
106
|
|
|
73
107
|
## 0.3.28 - 2026-11-09
|
|
74
108
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: devflow-toolkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Specification workflow toolkit for AI-assisted software changes
|
|
5
5
|
Author: DevFlow contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -32,7 +32,7 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
# DevFlow Toolkit
|
|
34
34
|
|
|
35
|
-
**Current version: `0.4.
|
|
35
|
+
**Current version: `0.4.3`.**
|
|
36
36
|
|
|
37
37
|
Before any code is written, you and the AI agree on what will be built
|
|
38
38
|
and approve it as a spec. The agent then implements once, on something
|
|
@@ -210,7 +210,7 @@ pip install devflow-toolkit
|
|
|
210
210
|
To install a specific built artifact instead:
|
|
211
211
|
|
|
212
212
|
```bash
|
|
213
|
-
pip install devflow_toolkit-0.4.
|
|
213
|
+
pip install devflow_toolkit-0.4.3-py3-none-any.whl
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
Verify the installation:
|
|
@@ -425,10 +425,6 @@ constitution:
|
|
|
425
425
|
- django-standards.md
|
|
426
426
|
specifications:
|
|
427
427
|
path: .devflow/specs
|
|
428
|
-
plans:
|
|
429
|
-
path: .devflow/plans
|
|
430
|
-
templates:
|
|
431
|
-
path: .devflow/templates
|
|
432
428
|
agent:
|
|
433
429
|
harness: opencode
|
|
434
430
|
model: provider/model-name
|
|
@@ -515,7 +511,7 @@ as an architectural constraint when it is present.
|
|
|
515
511
|
|
|
516
512
|
### Harnesses
|
|
517
513
|
|
|
518
|
-
| Harness | Status in 0.4.
|
|
514
|
+
| Harness | Status in 0.4.3 |
|
|
519
515
|
| --- | --- |
|
|
520
516
|
| OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
|
|
521
517
|
| Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
|
|
@@ -725,6 +721,20 @@ selected harness is invoked instead of being skipped with an empty
|
|
|
725
721
|
Discovery. Non-interactive runs keep the deterministic behavior for
|
|
726
722
|
concrete requests such as `Add a health endpoint`.
|
|
727
723
|
|
|
724
|
+
The planner's questions are proposals. For an authentication request,
|
|
725
|
+
the first options fit the project: Django sessions with the built-in
|
|
726
|
+
views and forms for a Django project, server-side sessions otherwise,
|
|
727
|
+
and API tokens only when the request mentions an API, tokens or a mobile
|
|
728
|
+
client. While a planner question is still pending, the Discovery agent
|
|
729
|
+
may rewrite its wording and options, put the recommended level-1 option
|
|
730
|
+
first and add a `next_level`; answered decisions are never rewritten.
|
|
731
|
+
|
|
732
|
+
Discovery and specification agents search only the project's own files
|
|
733
|
+
and skip virtual environments and installed dependencies (`venv`,
|
|
734
|
+
`.venv`, `node_modules`, `site-packages`), reading a dependency only for
|
|
735
|
+
one specific fact. Every prompt opens with the language rule, so the
|
|
736
|
+
agent answers in the configured language from its first message.
|
|
737
|
+
|
|
728
738
|
For user-generated content, Discovery must also resolve who writes it,
|
|
729
739
|
who may create, edit or delete it, moderation, authentication
|
|
730
740
|
mechanism, validation, ordering, lifecycle on parent deletion, admin
|
|
@@ -929,7 +939,7 @@ reference.
|
|
|
929
939
|
8. If artifacts exist without workflow state, diagnose with
|
|
930
940
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
931
941
|
|
|
932
|
-
Available commands in `0.4.
|
|
942
|
+
Available commands in `0.4.3`:
|
|
933
943
|
|
|
934
944
|
| Command | Status |
|
|
935
945
|
| --- | --- |
|
|
@@ -1162,7 +1172,7 @@ devflow approve 001
|
|
|
1162
1172
|
```
|
|
1163
1173
|
|
|
1164
1174
|
Approval is explicit and binds the decision to the current artifact
|
|
1165
|
-
digests. For a `0.4.
|
|
1175
|
+
digests. For a `0.4.3` change it binds `spec.md`, `discovery.yaml` and,
|
|
1166
1176
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
1167
1177
|
same approval is a no-op. If an artifact changes after validation,
|
|
1168
1178
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -1173,7 +1183,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
1173
1183
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
1174
1184
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
1175
1185
|
|
|
1176
|
-
Only the `spec` stage is available in `0.4.
|
|
1186
|
+
Only the `spec` stage is available in `0.4.3`, so `--stage` is optional
|
|
1177
1187
|
and defaults to `spec`. `--stage plan` and `--stage review` are
|
|
1178
1188
|
rejected. There are no `plan`, `implement` or
|
|
1179
1189
|
`review` commands in this release.
|
|
@@ -1256,12 +1266,18 @@ my-project/
|
|
|
1256
1266
|
│ ├── spec.md # only when Discovery is complete
|
|
1257
1267
|
│ ├── workflow.yaml # projection of events.jsonl
|
|
1258
1268
|
│ ├── events.jsonl # append-only source of truth
|
|
1269
|
+
│ ├── history/ # earlier versions of spec.md
|
|
1259
1270
|
│ └── .lock # per-change advisory lock
|
|
1260
1271
|
├── AGENTS.md
|
|
1261
1272
|
├── opencode.json # when OpenCode is selected
|
|
1262
1273
|
└── .opencode/agents/ # when OpenCode is selected
|
|
1263
1274
|
```
|
|
1264
1275
|
|
|
1276
|
+
DevFlow creates only `constitution/` and `specs/` inside `.devflow/`.
|
|
1277
|
+
Projects initialized before `0.4.2` may also have empty `plans/` and
|
|
1278
|
+
`templates/` folders and matching keys in `config.yaml`; nothing uses
|
|
1279
|
+
them, so they can be deleted.
|
|
1280
|
+
|
|
1265
1281
|
All managed files are identifiable: Markdown files contain
|
|
1266
1282
|
`<!-- devflow:managed -->`, and JSON files contain `"devflowManaged":
|
|
1267
1283
|
true`. Unmanaged files with the same names are left untouched and
|
|
@@ -32,7 +32,7 @@ tokens, which cost several times more than input tokens.
|
|
|
32
32
|
The goal is not to generate code faster, but to decide better before
|
|
33
33
|
generating it. Thinking is cheap; redoing code is expensive.
|
|
34
34
|
|
|
35
|
-
Current version: `0.4.
|
|
35
|
+
Current version: `0.4.3` · Python 3.11+ · Linux and macOS
|
|
36
36
|
|
|
37
37
|
## Install
|
|
38
38
|
|
|
@@ -182,6 +182,9 @@ written outside the normal flow.
|
|
|
182
182
|
personal data). Discovery covers the level-1 controls and offers
|
|
183
183
|
level 2 as the next step; a risk you decide to accept is recorded with
|
|
184
184
|
your name.
|
|
185
|
+
- **Questions never dead-end.** Critical and blocking decisions are
|
|
186
|
+
always asked, even beyond the question budget, and missing decisions
|
|
187
|
+
found while writing the spec are asked in the same session.
|
|
185
188
|
- **Grow step by step.** After approval, `devflow status 001` suggests
|
|
186
189
|
the next level as a new spec.
|
|
187
190
|
- **Small changes don't need DevFlow.** Use it when a change involves
|
|
@@ -35,7 +35,7 @@ grande. Cada vuelta sale más cara que la anterior.
|
|
|
35
35
|
| Código y alcance que nadie pidió | La spec fija requisitos (`FR`), criterios de aceptación (`AC`) y qué queda **fuera de alcance** |
|
|
36
36
|
| Cada uno usa la IA a su manera | Mismo flujo y mismas reglas de arquitectura y código en cada proyecto |
|
|
37
37
|
| No queda registro de las decisiones | Cada pregunta, respuesta y aprobación queda guardada en el repositorio |
|
|
38
|
-
| La seguridad se recuerda tarde | Discovery pregunta
|
|
38
|
+
| La seguridad se recuerda tarde | Discovery pregunta los controles de seguridad básicos (OWASP ASVS nivel 1) que toca el cambio, y los riesgos que se aceptan quedan con nombre |
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
@@ -85,25 +85,26 @@ Responde lo que puedas; las respuestas cortas también sirven.
|
|
|
85
85
|
3. ¿Cuántas rondas necesitaste? ¿Se te hizo largo?
|
|
86
86
|
4. ¿Las opciones de "siguiente nivel" y sus explicaciones te aportaron
|
|
87
87
|
algo?
|
|
88
|
+
5. ¿Las preguntas de seguridad te parecieron útiles o excesivas?
|
|
88
89
|
|
|
89
90
|
**Sobre la spec**
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
6. ¿La spec describe bien lo que querías construir?
|
|
93
|
+
7. ¿Hay algo que sobre, que falte o que no se entienda?
|
|
94
|
+
8. ¿Se la pasarías a un compañero para implementarla tal cual?
|
|
94
95
|
|
|
95
96
|
**Sobre la implementación (si la probaste)**
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
9. ¿El agente se mantuvo dentro de la spec o hizo cosas que no pedías?
|
|
99
|
+
10. ¿Necesitaste menos correcciones que de costumbre?
|
|
99
100
|
|
|
100
101
|
**En general**
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
11. ¿Qué fue lo más útil?
|
|
104
|
+
12. ¿Qué te molestó o te hizo perder tiempo?
|
|
105
|
+
13. ¿Lo usarías en tu trabajo diario? ¿Para qué tipo de cambios sí y para
|
|
105
106
|
cuáles no?
|
|
106
|
-
|
|
107
|
+
14. Si algo falló: ¿qué comando ejecutaste y qué mensaje salió?
|
|
107
108
|
|
|
108
109
|
Envía tus respuestas a **[nombre o canal de contacto]**.
|
|
109
110
|
|
|
@@ -111,7 +112,7 @@ Envía tus respuestas a **[nombre o canal de contacto]**.
|
|
|
111
112
|
|
|
112
113
|
## Limitaciones conocidas
|
|
113
114
|
|
|
114
|
-
- **Versión alfa (0.
|
|
115
|
+
- **Versión alfa (0.4.x).** Puede tener errores; justo por eso nos
|
|
115
116
|
interesa tu feedback.
|
|
116
117
|
- **Solo cubre la especificación.** La implementación la hace tu agente;
|
|
117
118
|
DevFlow todavía no verifica el resultado.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DevFlow Toolkit
|
|
2
2
|
|
|
3
|
-
**Current version: `0.4.
|
|
3
|
+
**Current version: `0.4.3`.**
|
|
4
4
|
|
|
5
5
|
Before any code is written, you and the AI agree on what will be built
|
|
6
6
|
and approve it as a spec. The agent then implements once, on something
|
|
@@ -178,7 +178,7 @@ pip install devflow-toolkit
|
|
|
178
178
|
To install a specific built artifact instead:
|
|
179
179
|
|
|
180
180
|
```bash
|
|
181
|
-
pip install devflow_toolkit-0.4.
|
|
181
|
+
pip install devflow_toolkit-0.4.3-py3-none-any.whl
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
Verify the installation:
|
|
@@ -393,10 +393,6 @@ constitution:
|
|
|
393
393
|
- django-standards.md
|
|
394
394
|
specifications:
|
|
395
395
|
path: .devflow/specs
|
|
396
|
-
plans:
|
|
397
|
-
path: .devflow/plans
|
|
398
|
-
templates:
|
|
399
|
-
path: .devflow/templates
|
|
400
396
|
agent:
|
|
401
397
|
harness: opencode
|
|
402
398
|
model: provider/model-name
|
|
@@ -483,7 +479,7 @@ as an architectural constraint when it is present.
|
|
|
483
479
|
|
|
484
480
|
### Harnesses
|
|
485
481
|
|
|
486
|
-
| Harness | Status in 0.4.
|
|
482
|
+
| Harness | Status in 0.4.3 |
|
|
487
483
|
| --- | --- |
|
|
488
484
|
| OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
|
|
489
485
|
| Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
|
|
@@ -693,6 +689,20 @@ selected harness is invoked instead of being skipped with an empty
|
|
|
693
689
|
Discovery. Non-interactive runs keep the deterministic behavior for
|
|
694
690
|
concrete requests such as `Add a health endpoint`.
|
|
695
691
|
|
|
692
|
+
The planner's questions are proposals. For an authentication request,
|
|
693
|
+
the first options fit the project: Django sessions with the built-in
|
|
694
|
+
views and forms for a Django project, server-side sessions otherwise,
|
|
695
|
+
and API tokens only when the request mentions an API, tokens or a mobile
|
|
696
|
+
client. While a planner question is still pending, the Discovery agent
|
|
697
|
+
may rewrite its wording and options, put the recommended level-1 option
|
|
698
|
+
first and add a `next_level`; answered decisions are never rewritten.
|
|
699
|
+
|
|
700
|
+
Discovery and specification agents search only the project's own files
|
|
701
|
+
and skip virtual environments and installed dependencies (`venv`,
|
|
702
|
+
`.venv`, `node_modules`, `site-packages`), reading a dependency only for
|
|
703
|
+
one specific fact. Every prompt opens with the language rule, so the
|
|
704
|
+
agent answers in the configured language from its first message.
|
|
705
|
+
|
|
696
706
|
For user-generated content, Discovery must also resolve who writes it,
|
|
697
707
|
who may create, edit or delete it, moderation, authentication
|
|
698
708
|
mechanism, validation, ordering, lifecycle on parent deletion, admin
|
|
@@ -897,7 +907,7 @@ reference.
|
|
|
897
907
|
8. If artifacts exist without workflow state, diagnose with
|
|
898
908
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
899
909
|
|
|
900
|
-
Available commands in `0.4.
|
|
910
|
+
Available commands in `0.4.3`:
|
|
901
911
|
|
|
902
912
|
| Command | Status |
|
|
903
913
|
| --- | --- |
|
|
@@ -1130,7 +1140,7 @@ devflow approve 001
|
|
|
1130
1140
|
```
|
|
1131
1141
|
|
|
1132
1142
|
Approval is explicit and binds the decision to the current artifact
|
|
1133
|
-
digests. For a `0.4.
|
|
1143
|
+
digests. For a `0.4.3` change it binds `spec.md`, `discovery.yaml` and,
|
|
1134
1144
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
1135
1145
|
same approval is a no-op. If an artifact changes after validation,
|
|
1136
1146
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -1141,7 +1151,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
1141
1151
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
1142
1152
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
1143
1153
|
|
|
1144
|
-
Only the `spec` stage is available in `0.4.
|
|
1154
|
+
Only the `spec` stage is available in `0.4.3`, so `--stage` is optional
|
|
1145
1155
|
and defaults to `spec`. `--stage plan` and `--stage review` are
|
|
1146
1156
|
rejected. There are no `plan`, `implement` or
|
|
1147
1157
|
`review` commands in this release.
|
|
@@ -1224,12 +1234,18 @@ my-project/
|
|
|
1224
1234
|
│ ├── spec.md # only when Discovery is complete
|
|
1225
1235
|
│ ├── workflow.yaml # projection of events.jsonl
|
|
1226
1236
|
│ ├── events.jsonl # append-only source of truth
|
|
1237
|
+
│ ├── history/ # earlier versions of spec.md
|
|
1227
1238
|
│ └── .lock # per-change advisory lock
|
|
1228
1239
|
├── AGENTS.md
|
|
1229
1240
|
├── opencode.json # when OpenCode is selected
|
|
1230
1241
|
└── .opencode/agents/ # when OpenCode is selected
|
|
1231
1242
|
```
|
|
1232
1243
|
|
|
1244
|
+
DevFlow creates only `constitution/` and `specs/` inside `.devflow/`.
|
|
1245
|
+
Projects initialized before `0.4.2` may also have empty `plans/` and
|
|
1246
|
+
`templates/` folders and matching keys in `config.yaml`; nothing uses
|
|
1247
|
+
them, so they can be deleted.
|
|
1248
|
+
|
|
1233
1249
|
All managed files are identifiable: Markdown files contain
|
|
1234
1250
|
`<!-- devflow:managed -->`, and JSON files contain `"devflowManaged":
|
|
1235
1251
|
true`. Unmanaged files with the same names are left untouched and
|
|
@@ -20,8 +20,6 @@ from devflow.models.project import (
|
|
|
20
20
|
CONFIG_RELATIVE_PATH = Path(".devflow") / "config.yaml"
|
|
21
21
|
DEFAULT_CONSTITUTION_PATH = Path(".devflow") / "constitution"
|
|
22
22
|
DEFAULT_SPECIFICATIONS_PATH = Path(".devflow") / "specs"
|
|
23
|
-
DEFAULT_PLANS_PATH = Path(".devflow") / "plans"
|
|
24
|
-
DEFAULT_TEMPLATES_PATH = Path(".devflow") / "templates"
|
|
25
23
|
DEFAULT_DOCUMENTATION_LANGUAGE = "en"
|
|
26
24
|
MAX_DISCOVERY_BUDGET = 100
|
|
27
25
|
# follow_up, maximum and max_rounds written by `devflow init` before
|
|
@@ -247,8 +245,6 @@ class DevFlowConfig:
|
|
|
247
245
|
technologies: dict[str, list[str]]
|
|
248
246
|
constitution: ConstitutionSettings
|
|
249
247
|
specifications_path: Path
|
|
250
|
-
plans_path: Path
|
|
251
|
-
templates_path: Path
|
|
252
248
|
documentation_language: str
|
|
253
249
|
agent: AgentSettings
|
|
254
250
|
discovery: DiscoverySettings = DiscoverySettings()
|
|
@@ -318,11 +314,9 @@ class ConfigManager:
|
|
|
318
314
|
data.get("specifications"),
|
|
319
315
|
"specifications",
|
|
320
316
|
)
|
|
321
|
-
plans
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
"templates",
|
|
325
|
-
)
|
|
317
|
+
# `plans` and `templates` were written by `devflow init` before
|
|
318
|
+
# 0.4.2. Nothing uses them, so older files keep loading and the keys
|
|
319
|
+
# are ignored.
|
|
326
320
|
documentation = self._mapping(
|
|
327
321
|
data.get("documentation", {}),
|
|
328
322
|
"documentation",
|
|
@@ -351,14 +345,6 @@ class ConfigManager:
|
|
|
351
345
|
),
|
|
352
346
|
"specifications.path",
|
|
353
347
|
)
|
|
354
|
-
plans_path = self._relative_path(
|
|
355
|
-
plans.get("path", DEFAULT_PLANS_PATH.as_posix()),
|
|
356
|
-
"plans.path",
|
|
357
|
-
)
|
|
358
|
-
templates_path = self._relative_path(
|
|
359
|
-
templates.get("path", DEFAULT_TEMPLATES_PATH.as_posix()),
|
|
360
|
-
"templates.path",
|
|
361
|
-
)
|
|
362
348
|
|
|
363
349
|
technologies = self._technologies(data.get("technologies", {}))
|
|
364
350
|
|
|
@@ -417,8 +403,6 @@ class ConfigManager:
|
|
|
417
403
|
),
|
|
418
404
|
),
|
|
419
405
|
specifications_path=specifications_path,
|
|
420
|
-
plans_path=plans_path,
|
|
421
|
-
templates_path=templates_path,
|
|
422
406
|
documentation_language=documentation_language,
|
|
423
407
|
agent=agent_settings,
|
|
424
408
|
discovery=discovery_settings,
|
|
@@ -490,12 +474,6 @@ class ConfigManager:
|
|
|
490
474
|
"specifications": {
|
|
491
475
|
"path": DEFAULT_SPECIFICATIONS_PATH.as_posix(),
|
|
492
476
|
},
|
|
493
|
-
"plans": {
|
|
494
|
-
"path": DEFAULT_PLANS_PATH.as_posix(),
|
|
495
|
-
},
|
|
496
|
-
"templates": {
|
|
497
|
-
"path": DEFAULT_TEMPLATES_PATH.as_posix(),
|
|
498
|
-
},
|
|
499
477
|
"documentation": {
|
|
500
478
|
"language": language,
|
|
501
479
|
},
|
|
@@ -658,8 +636,6 @@ class ConfigManager:
|
|
|
658
636
|
for path in (
|
|
659
637
|
config.constitution.path,
|
|
660
638
|
config.specifications_path,
|
|
661
|
-
config.plans_path,
|
|
662
|
-
config.templates_path,
|
|
663
639
|
):
|
|
664
640
|
resolved = path.resolve()
|
|
665
641
|
try:
|
|
@@ -1856,12 +1856,7 @@ class DiscoveryPlanner:
|
|
|
1856
1856
|
"application?",
|
|
1857
1857
|
"API tokens, browser cookies and session authentication change "
|
|
1858
1858
|
"security boundaries, dependencies and user-visible behavior.",
|
|
1859
|
-
(
|
|
1860
|
-
"New JSON API with Bearer tokens.",
|
|
1861
|
-
"JWT in an HttpOnly cookie for HTML views.",
|
|
1862
|
-
"Both the JSON API and the HTML views.",
|
|
1863
|
-
"Other (describe).",
|
|
1864
|
-
),
|
|
1859
|
+
_auth_integration_options(project, words),
|
|
1865
1860
|
)
|
|
1866
1861
|
if auth_question and (words & {"jwt", "oauth", "token"}):
|
|
1867
1862
|
if not (words & {
|
|
@@ -2235,6 +2230,53 @@ def _normalize(value: str) -> str:
|
|
|
2235
2230
|
return without_accents.lower()
|
|
2236
2231
|
|
|
2237
2232
|
|
|
2233
|
+
_API_WORDS = frozenset(
|
|
2234
|
+
{
|
|
2235
|
+
"api",
|
|
2236
|
+
"json",
|
|
2237
|
+
"rest",
|
|
2238
|
+
"jwt",
|
|
2239
|
+
"token",
|
|
2240
|
+
"tokens",
|
|
2241
|
+
"bearer",
|
|
2242
|
+
"endpoint",
|
|
2243
|
+
"endpoints",
|
|
2244
|
+
"oauth",
|
|
2245
|
+
"mobile",
|
|
2246
|
+
"movil",
|
|
2247
|
+
"spa",
|
|
2248
|
+
}
|
|
2249
|
+
)
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
def _auth_integration_options(
|
|
2253
|
+
project: Project,
|
|
2254
|
+
words: set[str],
|
|
2255
|
+
) -> tuple[str, ...]:
|
|
2256
|
+
"""Offer authentication options that fit the detected project."""
|
|
2257
|
+
if words & _API_WORDS:
|
|
2258
|
+
return (
|
|
2259
|
+
"New JSON API with Bearer tokens.",
|
|
2260
|
+
"JWT in an HttpOnly cookie for HTML views.",
|
|
2261
|
+
"Both the JSON API and the HTML views.",
|
|
2262
|
+
"Other (describe).",
|
|
2263
|
+
)
|
|
2264
|
+
frameworks = {value.lower() for value in project.frameworks}
|
|
2265
|
+
if "django" in frameworks:
|
|
2266
|
+
return (
|
|
2267
|
+
"Django sessions with the built-in login, logout and registration "
|
|
2268
|
+
"views and forms (recommended for level 1).",
|
|
2269
|
+
"Django sessions for the HTML views plus a JSON API with tokens.",
|
|
2270
|
+
"Other (describe).",
|
|
2271
|
+
)
|
|
2272
|
+
return (
|
|
2273
|
+
"Server-side sessions with the framework's built-in authentication "
|
|
2274
|
+
"(recommended for level 1).",
|
|
2275
|
+
"Sessions for the HTML views plus a JSON API with tokens.",
|
|
2276
|
+
"Other (describe).",
|
|
2277
|
+
)
|
|
2278
|
+
|
|
2279
|
+
|
|
2238
2280
|
def _words(text: str) -> set[str]:
|
|
2239
2281
|
return set(re.findall(r"[a-z0-9_]+", text))
|
|
2240
2282
|
|
|
@@ -85,6 +85,7 @@ def build_spec_prompt(
|
|
|
85
85
|
"execution_mode": execution_mode,
|
|
86
86
|
"project_mode": project_mode,
|
|
87
87
|
"language_note": _language_note(language),
|
|
88
|
+
"language_first": _language_first(language),
|
|
88
89
|
"architecture_note": architecture_note,
|
|
89
90
|
"discovery_note": discovery_note,
|
|
90
91
|
"mode_instructions": mode_instructions,
|
|
@@ -135,6 +136,7 @@ def build_discovery_prompt(
|
|
|
135
136
|
"harness_name": harness_name,
|
|
136
137
|
"execution_mode": execution_mode,
|
|
137
138
|
"language_note": _discovery_language_note(language),
|
|
139
|
+
"language_first": _language_first(language),
|
|
138
140
|
"mode_instructions": _discovery_mode_instructions(
|
|
139
141
|
discovery_path,
|
|
140
142
|
execution_mode,
|
|
@@ -469,6 +471,15 @@ def _language_note(language: str) -> str:
|
|
|
469
471
|
)
|
|
470
472
|
|
|
471
473
|
|
|
474
|
+
def _language_first(language: str) -> str:
|
|
475
|
+
"""Return the one-line language rule placed at the top of a prompt."""
|
|
476
|
+
target = (language or "en").strip() or "en"
|
|
477
|
+
return (
|
|
478
|
+
f"Write every message to the user in the language `{target}`, "
|
|
479
|
+
"starting with your first one."
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
|
|
472
483
|
def _discovery_language_note(language: str) -> str:
|
|
473
484
|
"""Return the prompt instruction that selects the conversation language."""
|
|
474
485
|
target = (language or "en").strip() or "en"
|
|
@@ -481,8 +492,8 @@ def _discovery_language_note(language: str) -> str:
|
|
|
481
492
|
"faithfully into the target language and write the translations into "
|
|
482
493
|
"the discovery record in place. Do not add, remove or re-scope "
|
|
483
494
|
"questions or decisions while translating. Preserve every id, "
|
|
484
|
-
"category, materiality, status, blocking flag
|
|
485
|
-
"
|
|
495
|
+
"category, materiality, status, blocking flag and evidence entry, "
|
|
496
|
+
"and keep paths, field names, category identifiers, "
|
|
486
497
|
"`Qn`/`An` identifiers, commands and digests exactly as shown. Do "
|
|
487
498
|
"not ask or answer in English unless the target language is `en`."
|
|
488
499
|
)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# DevFlow Discovery Task
|
|
2
2
|
|
|
3
|
+
{{language_first}}
|
|
4
|
+
|
|
3
5
|
You are the discovery agent for the project `{{project_name}}`.
|
|
4
6
|
|
|
5
7
|
## Source of Truth
|
|
@@ -151,6 +153,14 @@ user-visible behavior, security or authorization, persisted data or
|
|
|
151
153
|
migrations, an external dependency, the architecture, or would be
|
|
152
154
|
expensive to reverse.
|
|
153
155
|
|
|
156
|
+
## Exploring the Project
|
|
157
|
+
|
|
158
|
+
Search only the project's own files. Ignore virtual environments and
|
|
159
|
+
installed dependencies (`venv`, `.venv`, `env`, `node_modules`,
|
|
160
|
+
`site-packages`, build output) when listing or searching files. Read a
|
|
161
|
+
dependency's source only when one specific fact is needed as evidence,
|
|
162
|
+
and read just that part.
|
|
163
|
+
|
|
154
164
|
## Resolution Before Questions
|
|
155
165
|
|
|
156
166
|
Resolve a decision from the user's explicit answers and existing
|
|
@@ -350,10 +360,15 @@ assumption is unaccepted, and to `complete` only when nothing remains.
|
|
|
350
360
|
- Do not accept assumptions on the user's behalf. Acceptance is an
|
|
351
361
|
explicit human action.
|
|
352
362
|
- Preserve every existing id, category, materiality, status, blocking
|
|
353
|
-
flag, evidence entry
|
|
363
|
+
flag, evidence entry and the meaning of every answered decision.
|
|
354
364
|
When the target language differs, translate question, reason and
|
|
355
365
|
option text into it instead of adding, removing or re-scoping
|
|
356
366
|
decisions.
|
|
367
|
+
- A `pending` question that nobody has answered yet, including the
|
|
368
|
+
questions DevFlow generated before this session, is a proposal: you
|
|
369
|
+
may rewrite its wording and options so they fit the project, put the
|
|
370
|
+
recommended level-1 option first and add a `next_level`. Keep its id,
|
|
371
|
+
category and the subject of the decision.
|
|
357
372
|
- Never change the request, `spec_id`, `change` or `project_mode`.
|
|
358
373
|
- When you discover a requirement gap, append a new question instead
|
|
359
374
|
of hiding it in an answer or an assumption.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# DevFlow Specification Task
|
|
2
2
|
|
|
3
|
+
{{language_first}}
|
|
4
|
+
|
|
3
5
|
<!-- devflow:mode existing -->
|
|
4
6
|
You are the specification agent for the project `{{project_name}}`.
|
|
5
7
|
<!-- /devflow:mode -->
|
|
@@ -41,6 +43,10 @@ primary design inputs. The manifest is a declaration, not evidence of
|
|
|
41
43
|
implemented code.
|
|
42
44
|
<!-- /devflow:mode -->
|
|
43
45
|
|
|
46
|
+
Search only the project's own files: ignore virtual environments and
|
|
47
|
+
installed dependencies (`venv`, `.venv`, `node_modules`,
|
|
48
|
+
`site-packages`) unless one specific fact from a dependency is needed.
|
|
49
|
+
|
|
44
50
|
## Documentation Language
|
|
45
51
|
|
|
46
52
|
{{language_note}}
|
|
@@ -168,6 +168,11 @@ def test_init_detects_django_and_installs_only_its_guidelines(
|
|
|
168
168
|
assert config["project"]["type"] == "backend"
|
|
169
169
|
assert config["profiles"] == ["django-backend"]
|
|
170
170
|
assert "postgresql" in config["technologies"]["databases"]
|
|
171
|
+
assert "plans" not in config
|
|
172
|
+
assert "templates" not in config
|
|
173
|
+
assert not (tmp_path / ".devflow" / "plans").exists()
|
|
174
|
+
assert not (tmp_path / ".devflow" / "templates").exists()
|
|
175
|
+
assert (tmp_path / ".devflow" / "specs").is_dir()
|
|
171
176
|
|
|
172
177
|
constitution = tmp_path / ".devflow" / "constitution"
|
|
173
178
|
assert (constitution / "constitution.md").is_file()
|
|
@@ -959,3 +959,54 @@ def test_interactive_discovery_records_answers_and_generates_spec(
|
|
|
959
959
|
assert f"`{result.discovery_digest}`" in result.spec.path.read_text(
|
|
960
960
|
encoding="utf-8"
|
|
961
961
|
)
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
def _auth_options(tmp_path: Path, request: str, frameworks: list[str]):
|
|
965
|
+
document = DiscoveryPlanner().build(
|
|
966
|
+
request=request,
|
|
967
|
+
spec_id="001",
|
|
968
|
+
change="001-auth",
|
|
969
|
+
project_mode="existing",
|
|
970
|
+
project=Project(
|
|
971
|
+
root=tmp_path,
|
|
972
|
+
name="demo",
|
|
973
|
+
project_type="backend",
|
|
974
|
+
frameworks=frameworks,
|
|
975
|
+
),
|
|
976
|
+
profiles=(),
|
|
977
|
+
reference_paths=(),
|
|
978
|
+
category_paths={},
|
|
979
|
+
has_tests=True,
|
|
980
|
+
architecture=None,
|
|
981
|
+
now="2026-11-02T00:00:00Z",
|
|
982
|
+
)
|
|
983
|
+
question = next(
|
|
984
|
+
item
|
|
985
|
+
for item in document.questions
|
|
986
|
+
if item.question.startswith("How should authentication")
|
|
987
|
+
)
|
|
988
|
+
return question.options
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
def test_auth_question_fits_a_django_html_project(tmp_path: Path) -> None:
|
|
992
|
+
options = _auth_options(
|
|
993
|
+
tmp_path,
|
|
994
|
+
"Quiero crear un sistema de autenticación con registro, login y logout",
|
|
995
|
+
["Django"],
|
|
996
|
+
)
|
|
997
|
+
|
|
998
|
+
assert options[0].startswith("Django sessions")
|
|
999
|
+
assert "recommended" in options[0]
|
|
1000
|
+
assert not any("Bearer" in option for option in options)
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
def test_auth_question_offers_api_options_when_requested(
|
|
1004
|
+
tmp_path: Path,
|
|
1005
|
+
) -> None:
|
|
1006
|
+
options = _auth_options(
|
|
1007
|
+
tmp_path,
|
|
1008
|
+
"Add login with JWT tokens for the mobile app",
|
|
1009
|
+
["Django"],
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
assert options[0] == "New JSON API with Bearer tokens."
|
|
@@ -698,3 +698,23 @@ def test_repair_prompt_forbids_validation_scripts() -> None:
|
|
|
698
698
|
|
|
699
699
|
assert "Do not create scripts" in prompt
|
|
700
700
|
assert prompt.index("`es`") < prompt.index("## Task")
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
def test_old_config_with_plans_and_templates_still_loads(
|
|
704
|
+
tmp_path: Path,
|
|
705
|
+
) -> None:
|
|
706
|
+
config = ConfigManager(tmp_path).create(
|
|
707
|
+
Project(root=tmp_path, name="demo", project_type="unknown"),
|
|
708
|
+
[],
|
|
709
|
+
[],
|
|
710
|
+
)
|
|
711
|
+
path = config.path
|
|
712
|
+
data = yaml.safe_load(path.read_text(encoding="utf-8"))
|
|
713
|
+
data["plans"] = {"path": ".devflow/plans"}
|
|
714
|
+
data["templates"] = {"path": ".devflow/templates"}
|
|
715
|
+
path.write_text(yaml.safe_dump(data), encoding="utf-8")
|
|
716
|
+
|
|
717
|
+
loaded = ConfigManager(tmp_path).load()
|
|
718
|
+
|
|
719
|
+
assert loaded.specifications_path.name == "specs"
|
|
720
|
+
assert not hasattr(loaded, "plans_path")
|
|
@@ -1016,3 +1016,34 @@ def test_written_spec_has_no_checkboxes(tmp_path: Path) -> None:
|
|
|
1016
1016
|
content = result.spec.path.read_text(encoding="utf-8")
|
|
1017
1017
|
assert "[ ]" not in content
|
|
1018
1018
|
assert "devflow approve 001" in content.split("## 11.", 1)[1]
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
def test_prompts_start_with_the_language_and_skip_dependencies() -> None:
|
|
1022
|
+
from devflow.prompts import build_discovery_prompt, build_spec_prompt
|
|
1023
|
+
|
|
1024
|
+
common = {
|
|
1025
|
+
"request": "Add login",
|
|
1026
|
+
"project_name": "demo",
|
|
1027
|
+
"context_path": "context.md",
|
|
1028
|
+
"harness_name": "Fake",
|
|
1029
|
+
"execution_mode": "interactive",
|
|
1030
|
+
"permissions": AgentPermissions(),
|
|
1031
|
+
"language": "es",
|
|
1032
|
+
}
|
|
1033
|
+
discovery = build_discovery_prompt(
|
|
1034
|
+
**common,
|
|
1035
|
+
discovery_path="discovery.yaml",
|
|
1036
|
+
)
|
|
1037
|
+
spec = build_spec_prompt(
|
|
1038
|
+
**common,
|
|
1039
|
+
spec_path="spec.md",
|
|
1040
|
+
constitution_paths=[],
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
for prompt in (discovery, spec):
|
|
1044
|
+
head = prompt.split("\n\n", 2)[1]
|
|
1045
|
+
assert "`es`" in head
|
|
1046
|
+
assert "starting with your first one" in head
|
|
1047
|
+
assert "node_modules" in prompt
|
|
1048
|
+
flat = " ".join(discovery.split())
|
|
1049
|
+
assert "is a proposal: you may rewrite its wording and options" in flat
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/django-backend/profile.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{devflow_toolkit-0.4.1 → devflow_toolkit-0.4.3}/src/devflow/profiles/fastapi-backend/profile.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|