devflow-toolkit 0.3.18__tar.gz → 0.3.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/CHANGELOG.md +43 -0
  2. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/PKG-INFO +256 -61
  3. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/README.md +257 -62
  4. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/pyproject.toml +1 -1
  5. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/instructions.py +72 -61
  6. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/cli.py +1 -1
  7. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/spec.py +0 -1
  8. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/constitution.py +19 -0
  9. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/spec_workflow.py +15 -4
  10. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/specification.py +15 -1
  11. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/prompts/__init__.py +7 -2
  12. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_cli.py +8 -0
  13. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_harness_adapters.py +4 -3
  14. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_spec_workflow.py +103 -0
  15. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/.gitignore +0 -0
  16. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/LICENSE +0 -0
  17. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/__init__.py +0 -0
  18. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/__init__.py +0 -0
  19. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/agents.py +0 -0
  20. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/antigravity.py +0 -0
  21. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/base.py +0 -0
  22. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/claude_code.py +0 -0
  23. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/codex.py +0 -0
  24. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/detector.py +0 -0
  25. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/kiro.py +0 -0
  26. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/opencode.py +0 -0
  27. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/adapters/registry.py +0 -0
  28. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/__init__.py +0 -0
  29. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/approve.py +0 -0
  30. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/config.py +0 -0
  31. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/doctor.py +0 -0
  32. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/harness.py +0 -0
  33. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/init.py +0 -0
  34. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/recover.py +0 -0
  35. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/commands/status.py +0 -0
  36. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/__init__.py +0 -0
  37. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/architecture.py +0 -0
  38. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/artifacts/__init__.py +0 -0
  39. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/artifacts/errors.py +0 -0
  40. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/artifacts/models.py +0 -0
  41. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/artifacts/store.py +0 -0
  42. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/clock.py +0 -0
  43. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/config.py +0 -0
  44. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/discovery.py +0 -0
  45. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/file_types.py +0 -0
  46. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/ports.py +0 -0
  47. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/profile_manager.py +0 -0
  48. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/project.py +0 -0
  49. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/recovery.py +0 -0
  50. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/__init__.py +0 -0
  51. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/errors.py +0 -0
  52. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/events.py +0 -0
  53. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/locator.py +0 -0
  54. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/lock.py +0 -0
  55. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/manager.py +0 -0
  56. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/models.py +0 -0
  57. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/core/state/transitions.py +0 -0
  58. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/models/__init__.py +0 -0
  59. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/models/profile.py +0 -0
  60. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/models/project.py +0 -0
  61. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
  62. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
  63. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/base/constitution/architecture.md +0 -0
  64. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
  65. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/base/constitution/constitution.md +0 -0
  66. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/base/profile.yaml +0 -0
  67. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
  68. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/django-backend/profile.yaml +0 -0
  69. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
  70. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
  71. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/prompts/discovery-repair.md +0 -0
  72. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/prompts/discovery.md +0 -0
  73. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/src/devflow/prompts/spec.md +0 -0
  74. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_discovery.py +0 -0
  75. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_discovery_decisions.py +0 -0
  76. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_event_log.py +0 -0
  77. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_greenfield.py +0 -0
  78. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_hardening.py +0 -0
  79. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_recovery.py +0 -0
  80. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_state.py +0 -0
  81. {devflow_toolkit-0.3.18 → devflow_toolkit-0.3.20}/tests/test_state_replay.py +0 -0
@@ -2,6 +2,49 @@
2
2
 
3
3
  All notable changes to DevFlow Toolkit are documented in this file.
4
4
 
5
+ ## 0.3.20 - 2026-11-09
6
+
7
+ ### Changed
8
+
9
+ - An interactive `devflow spec --continue` now stops at the Discovery
10
+ checkpoint when it opened a Discovery session, like a new
11
+ `devflow spec`. Without `--auto`, one command opens at most one agent
12
+ session. A continuation whose Discovery is already complete still
13
+ writes the specification.
14
+ - Interactive Discovery and specification prompts tell the agent to ask
15
+ the user to exit the session when its phase is done, and warn that
16
+ exiting before `spec.md` is written makes DevFlow use its
17
+ deterministic draft.
18
+
19
+ ### Package
20
+
21
+ - Package version is `0.3.20`.
22
+
23
+ ## 0.3.19 - 2026-11-08
24
+
25
+ ### Added
26
+
27
+ - The generated `AGENTS.md` and `CLAUDE.md` include an "Implementing an
28
+ Approved Specification" section. A coding agent can implement an
29
+ approved spec directly: it checks `devflow status`, reads
30
+ `code-standards.md`, implements only the `FR-XXX` requirements and
31
+ reports every `AC-XXX`.
32
+
33
+ ### Changed
34
+
35
+ - `code-standards.md` is treated as an implementation-only document.
36
+ Discovery and specification prompts no longer ask the agent to read
37
+ it, and Claude Code no longer imports it into every session. The
38
+ specification still lists it in section 9.
39
+ - `AGENTS.md` and `CLAUDE.md` are shorter: duplicated workflow rules
40
+ and the unused plans directory were removed.
41
+ - `devflow version` reports `unknown` instead of a stale hard-coded
42
+ version when package metadata is unavailable.
43
+
44
+ ### Package
45
+
46
+ - Package version is `0.3.19`.
47
+
5
48
  ## 0.3.18 - 2026-11-06
6
49
 
7
50
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.18
3
+ Version: 0.3.20
4
4
  Summary: Specification workflow toolkit for AI-assisted software changes
5
5
  Author: DevFlow contributors
6
6
  License-Expression: MIT
@@ -32,47 +32,60 @@ Description-Content-Type: text/markdown
32
32
 
33
33
  # DevFlow Toolkit
34
34
 
35
- DevFlow is an installable command-line toolkit for managing
36
- specification-driven changes in existing software projects with the help
37
- of an AI coding agent.
35
+ **Current version: `0.3.20`.**
38
36
 
39
- It captures the project context, the project constitution and the
40
- approval history, so a specification can be reviewed and approved before
41
- anyone starts implementing it. DevFlow owns the workflow state; the
42
- selected agent harness is only the execution backend that drafts the
43
- specification.
37
+ DevFlow is a command-line toolkit for leading AI models and coding
38
+ agents through specification-driven changes in real software projects.
44
39
 
45
- This is the `0.3.17` MVP. It implements the **discovery and
46
- specification stages only**. It supports two specification contexts:
47
- **Existing Project** (the default) and **Greenfield**. It is not a
48
- complete SDD platform and does not include planning, implementation or
49
- review workflows.
40
+ The goal is simple: keep models and agents inside a process defined by
41
+ people. AI can write code quickly, but without clear limits it can also
42
+ produce unnecessary code, duplicate logic, invent scope or build things
43
+ nobody asked for. DevFlow exists to prevent that. The team decides what
44
+ will be built, why and under which rules **before** an agent writes code.
45
+
46
+ Discovery is the centre of that process. It is not a one-shot chat or a
47
+ form to fill in; it is a joint exploration between the human team and the
48
+ AI model. Both review the project, ask questions, challenge assumptions
49
+ and agree on the specification together. The AI is useful because it
50
+ explores with you, not because it decides for you. Your criteria become
51
+ visible in the discovery record, in the approved specification and at
52
+ every step of the process.
53
+
54
+ This MVP implements the **discovery and specification stages only**. It
55
+ supports two specification contexts: **Existing Project** (the default)
56
+ and **Greenfield**. It is not a complete SDD platform and does not
57
+ include planning, implementation or review workflows.
50
58
 
51
59
  Discovery decides whether a request is ready to become a
52
60
  specification. A specification is only generated when every decision is
53
61
  `resolved` or `assumed`, and every assumption has been explicitly
54
- accepted. Discovery is persisted, so an incomplete request
55
- can be resumed across sessions and agent harnesses. Discovery is also
56
- the requirement-gathering stage: ambiguity, authentication,
57
- permissions, moderation, data lifecycle, validation, ordering,
58
- administration, compatibility and out-of-scope decisions must be
59
- resolved there, not in `spec.md`.
62
+ accepted. Discovery is persisted, so an incomplete request can be
63
+ resumed across sessions and agent harnesses. Discovery is also the
64
+ requirement-gathering stage: ambiguity, authentication, permissions,
65
+ moderation, data lifecycle, validation, ordering, administration,
66
+ compatibility and out-of-scope decisions must be resolved there, not in
67
+ `spec.md`.
60
68
 
61
69
  ## The problem it solves
62
70
 
63
- AI agents can produce useful specifications, but the result is often a
64
- throwaway chat response:
71
+ AI agents can produce useful specifications, but without a controlled
72
+ process the result is often a throwaway chat response:
65
73
 
66
74
  - it is not tied to the real codebase;
67
- - it does not follow the project's own engineering rules;
75
+ - it ignores the project's own engineering rules;
76
+ - it grows in scope and produces code nobody requested;
68
77
  - there is no record of who approved it or which exact version was
69
78
  approved;
70
79
  - switching agents loses context and history.
71
80
 
72
- DevFlow keeps the specification, the evidence used to write it, the
73
- constitution and the approval record inside the project. Approvals are
74
- bound to SHA-256 digests, and the workflow state can be rebuilt from an
75
- append-only event log.
81
+ DevFlow turns that chat into a reviewable project artifact. It keeps the
82
+ specification, the evidence used to write it, the constitution and the
83
+ approval record inside the project. Approvals are bound to SHA-256
84
+ digests, and the workflow state can be rebuilt from an append-only event
85
+ log.
86
+
87
+ The point is not to generate more code faster. The point is to decide
88
+ better before generating any code.
76
89
 
77
90
  ## Two specification contexts
78
91
 
@@ -139,7 +152,7 @@ pip install devflow-toolkit
139
152
  To install a specific built artifact instead:
140
153
 
141
154
  ```bash
142
- pip install devflow_toolkit-0.3.17-py3-none-any.whl
155
+ pip install devflow_toolkit-0.3.20-py3-none-any.whl
143
156
  ```
144
157
 
145
158
  Verify the installation:
@@ -149,6 +162,88 @@ devflow --help
149
162
  devflow version
150
163
  ```
151
164
 
165
+ ## Quick start: from install to approved specification
166
+
167
+ This is the normal path for a new change:
168
+
169
+ 1. Install DevFlow and check the command-line tool:
170
+
171
+ ```bash
172
+ python -m venv .venv
173
+ source .venv/bin/activate
174
+ pip install devflow-toolkit
175
+ devflow version
176
+ ```
177
+
178
+ 2. Initialize the project. Choose a harness and a language:
179
+
180
+ ```bash
181
+ cd my-project
182
+ devflow init --harness opencode --language es
183
+ ```
184
+
185
+ `--language es` makes Discovery and `spec.md` use Spanish. In an
186
+ interactive terminal, `init` asks for the language and the model when
187
+ they are omitted. Add `--model provider/model-name` to pin a specific
188
+ model.
189
+
190
+ 3. Start a change. Discovery runs first:
191
+
192
+ ```bash
193
+ devflow spec "Agregar un formulario de contacto"
194
+ ```
195
+
196
+ 4. Answer every Discovery question and accept or reject every proposed
197
+ assumption. The interactive harness asks in the terminal. You can also
198
+ edit `.devflow/specs/<id>-<slug>/discovery.yaml` directly.
199
+
200
+ 5. Generate the specification once Discovery is complete:
201
+
202
+ ```bash
203
+ devflow spec --continue 001
204
+ ```
205
+
206
+ 6. Review `spec.md` and approve it:
207
+
208
+ ```bash
209
+ devflow status 001
210
+ devflow approve 001 --stage spec
211
+ ```
212
+
213
+ 7. Start the next change. The stored language and model are reused:
214
+
215
+ ```bash
216
+ devflow spec "Agregar validación al formulario"
217
+ ```
218
+
219
+ The exact change id appears in the command output and in
220
+ `.devflow/specs/`. Use `--auto` on `devflow spec` when you want to run
221
+ Discovery and the specification in one invocation.
222
+
223
+ ## Language
224
+
225
+ DevFlow can write Discovery questions, reasons, options and `spec.md`
226
+ prose in your language. Use a language code or a common name:
227
+
228
+ ```bash
229
+ devflow init --language es
230
+ devflow spec "Agregar un formulario de contacto" --language es
231
+ devflow config language es
232
+ ```
233
+
234
+ - `init --language es` stores Spanish as the project default. Without
235
+ `--language`, an interactive `init` asks for the language; `--yes`
236
+ keeps `en`.
237
+ - `spec --language es` uses Spanish and stores it as the new default, so
238
+ `devflow spec --continue 001` stays in Spanish.
239
+ - `config language es` changes the default without initializing the
240
+ project again.
241
+ - Common names such as `Spanish` are normalized to `es`.
242
+ - The agent translates existing Discovery questions in place and writes
243
+ new questions and the specification in the selected language.
244
+ - Identifiers such as `FR-001` and `AC-001`, paths, commands, code
245
+ blocks and digests are not translated.
246
+
152
247
  ## Initialization
153
248
 
154
249
  Run `devflow init` inside the project you want to manage:
@@ -177,6 +272,7 @@ Common options:
177
272
  ```bash
178
273
  devflow init --harness opencode --mode non-interactive
179
274
  devflow init --harness antigravity --mode interactive
275
+ devflow init --harness opencode --model provider/model-name
180
276
  devflow init --profile django-backend --name my-service
181
277
  devflow init --project-mode greenfield
182
278
  devflow init --language es
@@ -184,12 +280,20 @@ devflow init --no-agent
184
280
  devflow init --yes
185
281
  ```
186
282
 
187
- `init --language <code>` sets the language used for specification
188
- prose. The value is stored as `documentation.language` in
189
- `.devflow/config.yaml` and defaults to `en`. Common language names such
190
- as `Spanish` are normalized to their code (`es`). Required headings,
191
- section numbers, `FR-XXX`/`AC-XXX` identifiers, paths, commands and
192
- digests remain unchanged so structural validation still works.
283
+ `init --language <code>` sets the language used for Discovery and
284
+ specification prose. In an interactive terminal, `init` asks for the
285
+ language when `--language` is omitted; `--yes` keeps `en`. The value is
286
+ stored as `documentation.language` in `.devflow/config.yaml`. Common
287
+ language names such as `Spanish` are normalized to their code (`es`).
288
+ You can change it later with `devflow config language <code>`. Required
289
+ headings, section numbers, `FR-XXX`/`AC-XXX` identifiers, paths,
290
+ commands and digests remain unchanged so structural validation still
291
+ works.
292
+
293
+ `init --model <id>` stores the model used by the selected harness in
294
+ `agent.model`. When `--model` is omitted, an interactive `init` asks for
295
+ one. `--model` on `devflow spec` overrides the stored model for that run
296
+ only.
193
297
 
194
298
  `init --project-mode greenfield` creates `.devflow/architecture.yaml`
195
299
  from a template when it does not exist. It never overwrites an existing
@@ -240,6 +344,7 @@ templates:
240
344
  path: .devflow/templates
241
345
  agent:
242
346
  harness: opencode
347
+ model: provider/model-name
243
348
  execution:
244
349
  mode: non-interactive
245
350
  permissions:
@@ -248,6 +353,10 @@ agent:
248
353
  allow_source_code_changes: false
249
354
  ```
250
355
 
356
+ `agent.model` is optional. An empty value means the harness default.
357
+ `devflow harness use <harness> --model <id>` changes it later without
358
+ reinitializing the project.
359
+
251
360
  `constitution.files` accepts plain file names inside the constitution
252
361
  directory. Absolute paths, `..` and nested paths are rejected.
253
362
 
@@ -319,7 +428,7 @@ as an architectural constraint when it is present.
319
428
 
320
429
  ### Harnesses
321
430
 
322
- | Harness | Status in 0.3.17 |
431
+ | Harness | Status in 0.3.20 |
323
432
  | --- | --- |
324
433
  | OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
325
434
  | Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
@@ -332,6 +441,15 @@ Do not treat an unverified adapter as a compatibility guarantee. The
332
441
  generated files and command lines for Codex, Claude Code and Kiro may
333
442
  change as those integrations are tested.
334
443
 
444
+ DevFlow stores the harness and the model together. `devflow harness
445
+ current` shows the current selection, `devflow harness list` shows the
446
+ installed harnesses, `devflow harness models <harness>` lists the models
447
+ that the harness advertises, and `devflow harness use <harness> [--model
448
+ <id>]` changes the selection and regenerates that harness's integration
449
+ files. `init` and `harness use` ask for a model interactively; `--model`
450
+ on `spec` overrides it for one run. The selected model is passed to the
451
+ harness on the command line.
452
+
335
453
  For interactive Codex runs, DevFlow enables Codex's experimental
336
454
  `request_user_input` tool so Discovery questions can be answered by
337
455
  selecting an option instead of typing a free-form reply. Claude Code uses
@@ -355,13 +473,14 @@ reads are allowed, writes are scoped to `.devflow/specs` in interactive
355
473
  mode, and commands, web access and MCP servers are denied. The alias
356
474
  `agy` is accepted for `--harness`.
357
475
 
358
- To configure Discovery in Spanish, pass `--language es` to `init`, or to
359
- a single `spec` run. The conversation and the stored question text use
360
- the selected language.
476
+ To configure Discovery in Spanish, pass `--language es` to `init` or run
477
+ `devflow config language es`. `spec --language es` also persists the
478
+ language for subsequent runs. The conversation and the stored question
479
+ text use the selected language.
361
480
 
362
481
  For OpenCode, DevFlow generates `AGENTS.md`, `opencode.json` and the
363
482
  agents under `.opencode/agents/`. The project-level `opencode.json` can
364
- also select the model used by the agent, for example:
483
+ also select a default model, for example:
365
484
 
366
485
  ```json
367
486
  {
@@ -577,7 +696,7 @@ specification that still lists open questions.
577
696
  8. If artifacts exist without workflow state, diagnose with
578
697
  `devflow doctor <id>` and repair with `devflow recover <id>`.
579
698
 
580
- Available commands in `0.3.17`:
699
+ Available commands in `0.3.20`:
581
700
 
582
701
  | Command | Status |
583
702
  | --- | --- |
@@ -587,6 +706,11 @@ Available commands in `0.3.17`:
587
706
  | `devflow status <id>` | Implemented |
588
707
  | `devflow doctor <id>` | Implemented: read-only diagnostics |
589
708
  | `devflow recover <id>` | Implemented: register existing artifacts |
709
+ | `devflow config language <code>` | Implemented: change the documentation language |
710
+ | `devflow harness current` | Implemented: show the configured harness and model |
711
+ | `devflow harness list` | Implemented: list installed harnesses |
712
+ | `devflow harness models <harness>` | Implemented: list advertised models |
713
+ | `devflow harness use <harness>` | Implemented: change the harness and regenerate its files |
590
714
  | `devflow version` | Implemented |
591
715
  | `devflow plan` | Not implemented |
592
716
  | `devflow approve <id> --stage plan` | Rejected |
@@ -619,12 +743,13 @@ The command:
619
743
  architecture to `context.md`;
620
744
  6. stops without `spec.md` when any question or assumption remains
621
745
  unresolved;
622
- 7. in an interactive run, stops after Discovery is complete and prints
746
+ 7. in an interactive run, stops after the Discovery session and prints
623
747
  the next command, so you can choose the harness for the
624
748
  specification;
625
- 8. on `--continue` (or with `--auto`) invokes the selected harness with
626
- the specification prompt, validates the returned specification, and
627
- binds it to the Discovery digest;
749
+ 8. on `--continue` with Discovery already complete (or with `--auto`)
750
+ invokes the selected harness with the specification prompt,
751
+ validates the returned specification, and binds it to the Discovery
752
+ digest;
628
753
  9. writes `spec.md` and registers the Discovery and specification
629
754
  digests in the event log and the workflow projection.
630
755
 
@@ -638,6 +763,20 @@ devflow spec "Add a GET /patients endpoint"
638
763
  devflow spec --continue 006 . --harness opencode
639
764
  ```
640
765
 
766
+ Without `--auto`, one interactive command opens at most one agent
767
+ session. When a session ends, exit the harness (for example with
768
+ `/exit`) so DevFlow can validate the result locally, without spending
769
+ tokens:
770
+
771
+ - after a Discovery session, DevFlow stops and prints the next command,
772
+ also when the session was opened by `--continue`;
773
+ - after a specification session, DevFlow validates and registers
774
+ `spec.md`.
775
+
776
+ Exit the specification session only after the agent says `spec.md` is
777
+ written. If the file is missing or invalid, DevFlow writes its
778
+ deterministic draft instead.
779
+
641
780
  When no `--harness` is passed, an interactive `devflow spec` asks which
642
781
  installed harness to use before starting, even if `.devflow/config.yaml`
643
782
  already names one. The configured harness is offered as the default.
@@ -659,7 +798,9 @@ devflow spec --continue 006
659
798
 
660
799
  `--continue` is not a new specification. It reuses the stored request
661
800
  and project mode, loads Discovery, and stops until no decision is
662
- pending and every assumption is accepted. It reuses a current
801
+ pending and every assumption is accepted. If it opened a Discovery
802
+ session, it stops at the Discovery checkpoint; run `--continue` again to
803
+ write the specification. It reuses a current
663
804
  validated specification when the Discovery digest still matches;
664
805
  otherwise it archives the old specification and generates a new one. If
665
806
  an interrupted run left a complete `discovery.yaml` without
@@ -684,16 +825,19 @@ devflow spec --continue 006 --harness opencode
684
825
 
685
826
  `--auto` keeps the older one-shot flow: Discovery and the specification
686
827
  run in the same invocation. Without it, an interactive run stops at the
687
- Discovery checkpoint.
688
-
689
- `spec --language <code>` overrides the configured language for that run
690
- without changing `.devflow/config.yaml`. Interactive agent Discovery
691
- asks existing questions and writes new questions in that language, even
692
- when the stored question text was generated in English by the
693
- deterministic planner; the stored question, reason and option text is
694
- translated in place. Specifications written by an agent use the same
695
- language. The deterministic `--no-agent` planner still writes its own
696
- stored question text in English.
828
+ Discovery checkpoint, including a `--continue` run that answered the
829
+ remaining Discovery questions.
830
+
831
+ `spec --language <code>` selects the language for this run and stores it
832
+ as the project default in `.devflow/config.yaml`, so later `--continue`
833
+ runs keep the same language. Interactive agent Discovery asks existing
834
+ questions and writes new questions in that language, even when the
835
+ stored question text was generated in English by the deterministic
836
+ planner; the stored question, reason and option text is translated in
837
+ place. Specifications written by an agent use the same language. The
838
+ deterministic `--no-agent` planner still writes its own stored question
839
+ text in English. Use `devflow config language <code>` to change the
840
+ default without starting a run.
697
841
 
698
842
  If the harness is unavailable, fails, or returns an invalid document,
699
843
  DevFlow writes a deterministic draft and reports the reason. The command
@@ -769,7 +913,7 @@ devflow approve 001 --stage spec
769
913
  ```
770
914
 
771
915
  Approval is explicit and binds the decision to the current artifact
772
- digests. For a `0.3.17` change it binds `spec.md`, `discovery.yaml` and,
916
+ digests. For a `0.3.20` change it binds `spec.md`, `discovery.yaml` and,
773
917
  when a manifest applies, the architecture manifest digest. Repeating the
774
918
  same approval is a no-op. If an artifact changes after validation,
775
919
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -780,10 +924,33 @@ and names the pending questions and assumptions. Approval also rejects a
780
924
  specification whose section 7 still lists open questions. Legacy `0.2.0`
781
925
  changes without `discovery.yaml` remain approvable with a warning.
782
926
 
783
- Only the `spec` stage is available in `0.3.17`. `--stage plan` and
927
+ Only the `spec` stage is available in `0.3.20`. `--stage plan` and
784
928
  `--stage review` are rejected. There are no `plan`, `implement` or
785
929
  `review` commands in this release.
786
930
 
931
+ ### Implement an approved specification
932
+
933
+ DevFlow does not run the implementation itself. Once the spec is
934
+ approved, ask your coding agent to implement it:
935
+
936
+ ```text
937
+ Implement .devflow/specs/001-add-patients-endpoint/spec.md
938
+ ```
939
+
940
+ The generated `AGENTS.md` (or `CLAUDE.md`) tells the agent to:
941
+
942
+ 1. confirm with `devflow status 001` that the change is
943
+ `spec_approved` and the spec artifact is `approved`, not `stale`;
944
+ 2. read the spec, the constitution and `code-standards.md`;
945
+ 3. implement only the `FR-XXX` requirements and nothing out of scope;
946
+ 4. add or update tests for every `AC-XXX` and report each one;
947
+ 5. leave `.devflow/specs/` untouched and stop on ambiguity instead of
948
+ resolving it silently.
949
+
950
+ `code-standards.md` governs how code is written, so it is read only in
951
+ this step. Discovery and specification prompts skip it to save tokens;
952
+ the specification still lists it in section 9.
953
+
787
954
  ## Generated files
788
955
 
789
956
  ```text
@@ -843,6 +1010,32 @@ user with full filesystem access can modify it; DevFlow detects
843
1010
  structural and semantic inconsistency, not deliberate tampering by an
844
1011
  administrator.
845
1012
 
1013
+ ## Glossary
1014
+
1015
+ | Term | Meaning |
1016
+ | --- | --- |
1017
+ | **Agent** | An AI model connected through a harness. It explores the project, asks Discovery questions and writes drafts; DevFlow's deterministic checks enforce the rules. |
1018
+ | **Harness** | The adapter that connects DevFlow to an agent: OpenCode, Antigravity, Codex, Claude Code or Kiro. `none` means no agent is invoked; only deterministic analysis runs. |
1019
+ | **Model** | The specific AI model used by a harness, for example `provider/model-name`. `init` and `devflow harness use` select it; `spec --model` overrides it for one run. |
1020
+ | **Discovery** | The joint exploration between the team and the AI that decides whether a request is ready to become a specification. It lives in `discovery.yaml`. |
1021
+ | **Decision** | A point Discovery must settle: scope, behaviour, data, permissions, architecture boundary, compatibility or out-of-scope work. A decision is `pending`, `resolved` or `assumed`. |
1022
+ | **Question** | A pending decision presented to a person. It has a category, a materiality and a blocking flag. |
1023
+ | **Assumption** | A proposed default for a decision that was not resolved by evidence or an explicit answer. A person must accept or reject it; it never becomes accepted on its own. |
1024
+ | **Materiality** | How much a decision can change the result: `critical`, `functional`, `technical` or `cosmetic`. Critical and security decisions cannot be assumed. |
1025
+ | **Blocking** | A decision that must be settled before a specification can be generated. |
1026
+ | **Context** | The generated `context.md`. Its **Decision Context** carries approved decisions, conventions, constraints and open questions; its **Project Evidence** carries the request, static analysis, relevant code, constitution scope and declared architecture. |
1027
+ | **Constitution** | The project's own engineering rules and standards. DevFlow copies them into `.devflow/constitution/`, and the agent must respect them. |
1028
+ | **Specification** | The reviewable `spec.md` with requirements and acceptance criteria. It is generated only after Discovery is complete and has no open questions. |
1029
+ | **Change** | One request tracked under `.devflow/specs/<id>-<slug>/`. The numeric id is stable and is used by `status`, `approve` and `--continue`. |
1030
+ | **Approval** | An explicit human authorization recorded for a stage. In this release, only the `spec` stage can be approved. |
1031
+ | **Digest** | A SHA-256 fingerprint of an artifact. An approval binds the exact version reviewed, not just the file name. |
1032
+ | **Stale** | An artifact that changed after it was validated or approved. A stale artifact must be regenerated or revalidated before it can be approved. |
1033
+ | **Workflow state** | The recorded history of a change. `events.jsonl` is the append-only source of truth; `workflow.yaml` is a regenerable projection. |
1034
+ | **Existing project** | The default context: the specification is grounded in the real codebase, its conventions and its constitution. |
1035
+ | **Greenfield** | A context for a system that does not exist yet. The specification is grounded in requirements and `.devflow/architecture.yaml`; DevFlow does not scaffold code. |
1036
+ | **Architecture manifest** | `.devflow/architecture.yaml`: the declared style, modules, layers, stack and constraints. DevFlow validates its structure, not its architectural quality. |
1037
+ | **Language** | The language used for Discovery questions and `spec.md` prose (`en`, `es`, ...). Identifiers, paths, commands and digests are never translated. |
1038
+
846
1039
  ## Updating DevFlow
847
1040
 
848
1041
  ```bash
@@ -863,15 +1056,17 @@ configuration.
863
1056
 
864
1057
  ## Known limitations
865
1058
 
866
- - Only the specification stage is implemented. Planning,
867
- implementation and review are not available.
1059
+ - Only the specification stage is implemented. Planning and review are
1060
+ not available. Implementation is delegated to the coding agent through
1061
+ the generated `AGENTS.md` instructions; DevFlow does not verify it.
868
1062
  - Greenfield mode produces a specification from a declared
869
1063
  architecture. It does not scaffold a project, generate application
870
1064
  code, create Docker or cloud infrastructure, or implement tasks.
871
1065
  - DevFlow validates the structure of the architecture manifest. It does
872
1066
  not certify that the architecture is correct, complete or appropriate.
873
- - Only OpenCode has been verified end-to-end. Codex, Claude Code and
874
- Kiro adapters are unverified scaffolds for future releases.
1067
+ - Only OpenCode has been verified end-to-end. Antigravity loading and
1068
+ print mode are verified, but not the full workflow. Codex, Claude
1069
+ Code and Kiro adapters are unverified scaffolds for future releases.
875
1070
  - Interactive harness mode exists, but the verified release path is
876
1071
  OpenCode non-interactive mode. Interactive mode requires a terminal.
877
1072
  - Without an available harness, output is produced by deterministic