devflow-toolkit 0.3.13__tar.gz → 0.3.15__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 (78) hide show
  1. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/CHANGELOG.md +42 -0
  2. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/PKG-INFO +42 -14
  3. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/README.md +41 -13
  4. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/pyproject.toml +1 -1
  5. devflow_toolkit-0.3.15/src/devflow/adapters/antigravity.py +282 -0
  6. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/opencode.py +18 -3
  7. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/registry.py +2 -0
  8. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/cli.py +1 -1
  9. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/approve.py +1 -1
  10. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/harness.py +2 -1
  11. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/init.py +2 -1
  12. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/spec.py +1 -1
  13. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/config.py +4 -0
  14. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/discovery.py +27 -7
  15. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/spec_workflow.py +2 -0
  16. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/prompts/__init__.py +32 -0
  17. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/prompts/discovery.md +1 -1
  18. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_discovery.py +59 -0
  19. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_harness_adapters.py +142 -2
  20. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_spec_workflow.py +37 -1
  21. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/.gitignore +0 -0
  22. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/LICENSE +0 -0
  23. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/__init__.py +0 -0
  24. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/__init__.py +0 -0
  25. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/agents.py +0 -0
  26. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/base.py +0 -0
  27. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/claude_code.py +0 -0
  28. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/codex.py +0 -0
  29. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/detector.py +0 -0
  30. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/instructions.py +0 -0
  31. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/adapters/kiro.py +0 -0
  32. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/__init__.py +0 -0
  33. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/doctor.py +0 -0
  34. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/recover.py +0 -0
  35. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/commands/status.py +0 -0
  36. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/__init__.py +0 -0
  37. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/architecture.py +0 -0
  38. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/artifacts/__init__.py +0 -0
  39. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/artifacts/errors.py +0 -0
  40. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/artifacts/models.py +0 -0
  41. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/artifacts/store.py +0 -0
  42. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/clock.py +0 -0
  43. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/constitution.py +0 -0
  44. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/ports.py +0 -0
  45. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/profile_manager.py +0 -0
  46. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/project.py +0 -0
  47. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/recovery.py +0 -0
  48. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/specification.py +0 -0
  49. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/__init__.py +0 -0
  50. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/errors.py +0 -0
  51. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/events.py +0 -0
  52. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/locator.py +0 -0
  53. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/lock.py +0 -0
  54. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/manager.py +0 -0
  55. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/models.py +0 -0
  56. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/core/state/transitions.py +0 -0
  57. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/models/__init__.py +0 -0
  58. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/models/profile.py +0 -0
  59. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/models/project.py +0 -0
  60. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
  61. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
  62. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/base/constitution/architecture.md +0 -0
  63. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
  64. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/base/constitution/constitution.md +0 -0
  65. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/base/profile.yaml +0 -0
  66. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
  67. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/django-backend/profile.yaml +0 -0
  68. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
  69. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
  70. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/prompts/spec.greenfield.md +0 -0
  71. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/src/devflow/prompts/spec.md +0 -0
  72. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_cli.py +0 -0
  73. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_event_log.py +0 -0
  74. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_greenfield.py +0 -0
  75. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_hardening.py +0 -0
  76. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_recovery.py +0 -0
  77. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_state.py +0 -0
  78. {devflow_toolkit-0.3.13 → devflow_toolkit-0.3.15}/tests/test_state_replay.py +0 -0
@@ -2,6 +2,48 @@
2
2
 
3
3
  All notable changes to DevFlow Toolkit are documented in this file.
4
4
 
5
+ ## 0.3.15 - 2026-11-05
6
+
7
+ ### Added
8
+
9
+ - Google Antigravity (`agy`) is now a supported harness. `devflow init
10
+ --harness antigravity` generates `AGENTS.md` and the custom agents
11
+ `.agents/agents/devflow-spec.md` and
12
+ `.agents/agents/devflow-spec-readonly.md`, and adds them to the
13
+ managed `.gitignore` block. Interactive runs use the writable agent
14
+ with `ask_question` enabled; non-interactive runs use the read-only
15
+ agent in print mode.
16
+ - Antigravity permissions scope project reads and `.devflow/specs`
17
+ writes, and deny commands, web access and MCP servers. The inline
18
+ `--settings` payload also trusts the project workspace so the CLI does
19
+ not stop at the trust prompt.
20
+
21
+ ### Changed
22
+
23
+ - Interactive OpenCode Discovery now explicitly tells the generated
24
+ `devflow-spec` agent to call the `question` tool for every pending
25
+ question and every assumption acceptance instead of asking in
26
+ free-form prose.
27
+ - The Discovery prompt names the structured question tool for OpenCode
28
+ (`question`) and Antigravity (`ask_question`). Codex and Claude Code
29
+ prompt text is unchanged.
30
+ - Package version is `0.3.15`.
31
+
32
+ ## 0.3.14 - 2026-11-05
33
+
34
+ ### Fixed
35
+
36
+ - The deterministic planner no longer marks Discovery complete when a
37
+ request only matches generic data vocabulary. A request such as
38
+ "Quiero crear categorias de libros al momento de cargarlos a la base
39
+ de datos" now gets a generic blocking scope question instead of
40
+ skipping the harness with zero questions.
41
+ - Interactive runs now guarantee at least one Discovery question when
42
+ no specific heuristic matches, so the selected harness is always
43
+ invoked before a specification is generated. Non-interactive runs
44
+ keep the previous deterministic behavior for concrete requests.
45
+ - Package version is `0.3.14`.
46
+
5
47
  ## 0.3.13 - 2026-11-05
6
48
 
7
49
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.13
3
+ Version: 0.3.15
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.13` MVP. It implements the **discovery and
45
+ This is the `0.3.15` 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
@@ -101,9 +101,10 @@ identity for the project:
101
101
  - A POSIX operating system (Linux or macOS). Windows is not tested and is
102
102
  not supported in this release, because the workflow locks require
103
103
  `fcntl`.
104
- - For agent-generated specifications: OpenCode installed and
105
- authenticated on `PATH`. OpenCode is the only harness verified
106
- end-to-end for this release.
104
+ - For agent-generated specifications: OpenCode or Google Antigravity
105
+ (`agy`) installed and authenticated on `PATH`. OpenCode is verified
106
+ end-to-end; Antigravity agent loading and print mode are verified
107
+ locally.
107
108
  - Git is not required. DevFlow does not initialize a repository, commit
108
109
  files or run destructive commands.
109
110
 
@@ -118,7 +119,7 @@ pip install devflow-toolkit
118
119
  To install a specific built artifact instead:
119
120
 
120
121
  ```bash
121
- pip install devflow_toolkit-0.3.13-py3-none-any.whl
122
+ pip install devflow_toolkit-0.3.15-py3-none-any.whl
122
123
  ```
123
124
 
124
125
  Verify the installation:
@@ -155,6 +156,7 @@ Common options:
155
156
 
156
157
  ```bash
157
158
  devflow init --harness opencode --mode non-interactive
159
+ devflow init --harness antigravity --mode interactive
158
160
  devflow init --profile django-backend --name my-service
159
161
  devflow init --project-mode greenfield
160
162
  devflow init --language es
@@ -297,9 +299,10 @@ as an architectural constraint when it is present.
297
299
 
298
300
  ### Harnesses
299
301
 
300
- | Harness | Status in 0.3.13 |
302
+ | Harness | Status in 0.3.15 |
301
303
  | --- | --- |
302
- | OpenCode | Verified end-to-end in non-interactive mode |
304
+ | OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
305
+ | Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
303
306
  | Codex | Integration files are generated, but not verified for this release |
304
307
  | Claude Code | Integration files are generated, but not verified for this release |
305
308
  | Kiro | Integration files are generated, but not verified for this release |
@@ -316,6 +319,26 @@ its native `AskUserQuestion` dialog. Both adapters fall back to numbered
316
319
  text options if the installed harness does not expose a structured
317
320
  question tool.
318
321
 
322
+ OpenCode and Antigravity receive an explicit instruction to call their
323
+ structured question tool for every pending Discovery question and for
324
+ every assumption acceptance. OpenCode's tool is `question`; Antigravity's
325
+ tool is `ask_question`. The instruction is injected only for those
326
+ harnesses, so the Codex and Claude Code prompts are unchanged.
327
+
328
+ For Antigravity, DevFlow generates `AGENTS.md` and custom agents under
329
+ `.agents/agents/`. Interactive runs use the writable `devflow-spec`
330
+ agent with `agy --settings <json> --agent devflow-spec
331
+ --prompt-interactive <prompt>`. Non-interactive runs use the read-only
332
+ `devflow-spec-readonly` agent with `agy --settings <json> --agent
333
+ devflow-spec-readonly --print --output-format text <prompt>`. Project
334
+ reads are allowed, writes are scoped to `.devflow/specs` in interactive
335
+ mode, and commands, web access and MCP servers are denied. The alias
336
+ `agy` is accepted for `--harness`.
337
+
338
+ To configure Discovery in Spanish, pass `--language es` to `init`, or to
339
+ a single `spec` run. The conversation and the stored question text use
340
+ the selected language.
341
+
319
342
  For OpenCode, DevFlow generates `AGENTS.md`, `opencode.json` and the
320
343
  agents under `.opencode/agents/`. The project-level `opencode.json` can
321
344
  also select the model used by the agent, for example:
@@ -412,9 +435,14 @@ generated.
412
435
 
413
436
  The deterministic planner recognizes contact pages, forms, comments,
414
437
  authentication, persistence, deployments and architecture boundaries in
415
- English and Spanish. If a short request does not match any known feature
416
- vocabulary, the planner adds a generic blocking scope question instead
417
- of marking Discovery complete with no questions.
438
+ English and Spanish. Generic data vocabulary such as `datos`, `data` or
439
+ `database` does not by itself prove that the feature scope is understood:
440
+ when it is the only match, the planner adds a generic blocking scope
441
+ question instead of marking Discovery complete. Interactive runs always
442
+ produce at least one question when no specific question matches, so the
443
+ selected harness is invoked instead of being skipped with an empty
444
+ Discovery. Non-interactive runs keep the deterministic behavior for
445
+ concrete requests such as `Add a health endpoint`.
418
446
 
419
447
  For user-generated content, Discovery must also resolve who writes it,
420
448
  who may create, edit or delete it, moderation, authentication
@@ -475,7 +503,7 @@ specification that still lists open questions.
475
503
  8. If artifacts exist without workflow state, diagnose with
476
504
  `devflow doctor <id>` and repair with `devflow recover <id>`.
477
505
 
478
- Available commands in `0.3.13`:
506
+ Available commands in `0.3.15`:
479
507
 
480
508
  | Command | Status |
481
509
  | --- | --- |
@@ -667,7 +695,7 @@ devflow approve 001 --stage spec
667
695
  ```
668
696
 
669
697
  Approval is explicit and binds the decision to the current artifact
670
- digests. For a `0.3.13` change it binds `spec.md`, `discovery.yaml` and,
698
+ digests. For a `0.3.15` change it binds `spec.md`, `discovery.yaml` and,
671
699
  when a manifest applies, the architecture manifest digest. Repeating the
672
700
  same approval is a no-op. If an artifact changes after validation,
673
701
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -678,7 +706,7 @@ and names the pending questions and assumptions. Approval also rejects a
678
706
  specification whose section 7 still lists open questions. Legacy `0.2.0`
679
707
  changes without `discovery.yaml` remain approvable with a warning.
680
708
 
681
- Only the `spec` stage is available in `0.3.13`. `--stage plan` and
709
+ Only the `spec` stage is available in `0.3.15`. `--stage plan` and
682
710
  `--stage review` are rejected. There are no `plan`, `implement` or
683
711
  `review` commands in this release.
684
712
 
@@ -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` MVP. It implements the **discovery and
13
+ This is the `0.3.15` 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
@@ -69,9 +69,10 @@ identity for the project:
69
69
  - A POSIX operating system (Linux or macOS). Windows is not tested and is
70
70
  not supported in this release, because the workflow locks require
71
71
  `fcntl`.
72
- - For agent-generated specifications: OpenCode installed and
73
- authenticated on `PATH`. OpenCode is the only harness verified
74
- end-to-end for this release.
72
+ - For agent-generated specifications: OpenCode or Google Antigravity
73
+ (`agy`) installed and authenticated on `PATH`. OpenCode is verified
74
+ end-to-end; Antigravity agent loading and print mode are verified
75
+ locally.
75
76
  - Git is not required. DevFlow does not initialize a repository, commit
76
77
  files or run destructive commands.
77
78
 
@@ -86,7 +87,7 @@ pip install devflow-toolkit
86
87
  To install a specific built artifact instead:
87
88
 
88
89
  ```bash
89
- pip install devflow_toolkit-0.3.13-py3-none-any.whl
90
+ pip install devflow_toolkit-0.3.15-py3-none-any.whl
90
91
  ```
91
92
 
92
93
  Verify the installation:
@@ -123,6 +124,7 @@ Common options:
123
124
 
124
125
  ```bash
125
126
  devflow init --harness opencode --mode non-interactive
127
+ devflow init --harness antigravity --mode interactive
126
128
  devflow init --profile django-backend --name my-service
127
129
  devflow init --project-mode greenfield
128
130
  devflow init --language es
@@ -265,9 +267,10 @@ as an architectural constraint when it is present.
265
267
 
266
268
  ### Harnesses
267
269
 
268
- | Harness | Status in 0.3.13 |
270
+ | Harness | Status in 0.3.15 |
269
271
  | --- | --- |
270
- | OpenCode | Verified end-to-end in non-interactive mode |
272
+ | OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
273
+ | Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
271
274
  | Codex | Integration files are generated, but not verified for this release |
272
275
  | Claude Code | Integration files are generated, but not verified for this release |
273
276
  | Kiro | Integration files are generated, but not verified for this release |
@@ -284,6 +287,26 @@ its native `AskUserQuestion` dialog. Both adapters fall back to numbered
284
287
  text options if the installed harness does not expose a structured
285
288
  question tool.
286
289
 
290
+ OpenCode and Antigravity receive an explicit instruction to call their
291
+ structured question tool for every pending Discovery question and for
292
+ every assumption acceptance. OpenCode's tool is `question`; Antigravity's
293
+ tool is `ask_question`. The instruction is injected only for those
294
+ harnesses, so the Codex and Claude Code prompts are unchanged.
295
+
296
+ For Antigravity, DevFlow generates `AGENTS.md` and custom agents under
297
+ `.agents/agents/`. Interactive runs use the writable `devflow-spec`
298
+ agent with `agy --settings <json> --agent devflow-spec
299
+ --prompt-interactive <prompt>`. Non-interactive runs use the read-only
300
+ `devflow-spec-readonly` agent with `agy --settings <json> --agent
301
+ devflow-spec-readonly --print --output-format text <prompt>`. Project
302
+ reads are allowed, writes are scoped to `.devflow/specs` in interactive
303
+ mode, and commands, web access and MCP servers are denied. The alias
304
+ `agy` is accepted for `--harness`.
305
+
306
+ To configure Discovery in Spanish, pass `--language es` to `init`, or to
307
+ a single `spec` run. The conversation and the stored question text use
308
+ the selected language.
309
+
287
310
  For OpenCode, DevFlow generates `AGENTS.md`, `opencode.json` and the
288
311
  agents under `.opencode/agents/`. The project-level `opencode.json` can
289
312
  also select the model used by the agent, for example:
@@ -380,9 +403,14 @@ generated.
380
403
 
381
404
  The deterministic planner recognizes contact pages, forms, comments,
382
405
  authentication, persistence, deployments and architecture boundaries in
383
- English and Spanish. If a short request does not match any known feature
384
- vocabulary, the planner adds a generic blocking scope question instead
385
- of marking Discovery complete with no questions.
406
+ English and Spanish. Generic data vocabulary such as `datos`, `data` or
407
+ `database` does not by itself prove that the feature scope is understood:
408
+ when it is the only match, the planner adds a generic blocking scope
409
+ question instead of marking Discovery complete. Interactive runs always
410
+ produce at least one question when no specific question matches, so the
411
+ selected harness is invoked instead of being skipped with an empty
412
+ Discovery. Non-interactive runs keep the deterministic behavior for
413
+ concrete requests such as `Add a health endpoint`.
386
414
 
387
415
  For user-generated content, Discovery must also resolve who writes it,
388
416
  who may create, edit or delete it, moderation, authentication
@@ -443,7 +471,7 @@ specification that still lists open questions.
443
471
  8. If artifacts exist without workflow state, diagnose with
444
472
  `devflow doctor <id>` and repair with `devflow recover <id>`.
445
473
 
446
- Available commands in `0.3.13`:
474
+ Available commands in `0.3.15`:
447
475
 
448
476
  | Command | Status |
449
477
  | --- | --- |
@@ -635,7 +663,7 @@ devflow approve 001 --stage spec
635
663
  ```
636
664
 
637
665
  Approval is explicit and binds the decision to the current artifact
638
- digests. For a `0.3.13` change it binds `spec.md`, `discovery.yaml` and,
666
+ digests. For a `0.3.15` change it binds `spec.md`, `discovery.yaml` and,
639
667
  when a manifest applies, the architecture manifest digest. Repeating the
640
668
  same approval is a no-op. If an artifact changes after validation,
641
669
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -646,7 +674,7 @@ and names the pending questions and assumptions. Approval also rejects a
646
674
  specification whose section 7 still lists open questions. Legacy `0.2.0`
647
675
  changes without `discovery.yaml` remain approvable with a warning.
648
676
 
649
- Only the `spec` stage is available in `0.3.13`. `--stage plan` and
677
+ Only the `spec` stage is available in `0.3.15`. `--stage plan` and
650
678
  `--stage review` are rejected. There are no `plan`, `implement` or
651
679
  `review` commands in this release.
652
680
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "devflow-toolkit"
7
- version = "0.3.13"
7
+ version = "0.3.15"
8
8
  description = "Specification workflow toolkit for AI-assisted software changes"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -0,0 +1,282 @@
1
+ """Google Antigravity (``agy``) harness adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from pathlib import Path
7
+ from typing import Any
8
+
9
+ import yaml
10
+
11
+ from devflow.adapters.base import (
12
+ FileChange,
13
+ HarnessAdapter,
14
+ Invocation,
15
+ RunContext,
16
+ SetupContext,
17
+ SetupResult,
18
+ )
19
+ from devflow.adapters.instructions import (
20
+ MANAGED_MARKER,
21
+ render_agent_instructions,
22
+ write_gitignore_entries,
23
+ write_text_managed,
24
+ )
25
+
26
+ INTERACTIVE_AGENT = "devflow-spec"
27
+ READONLY_AGENT = "devflow-spec-readonly"
28
+
29
+ _READ_TOOLS = ["read_file"]
30
+ _WRITE_TOOLS = ["write_file"]
31
+ _QUESTION_TOOLS = ["ask_question"]
32
+
33
+
34
+ class AntigravityAdapter(HarnessAdapter):
35
+ """Generate Antigravity custom agents and invoke ``agy``."""
36
+
37
+ name = "antigravity"
38
+ display_name = "Antigravity"
39
+ executable = "agy"
40
+
41
+ def setup(self, context: SetupContext) -> SetupResult:
42
+ changes: list[FileChange] = []
43
+ warnings: list[str] = []
44
+ ignored: list[str] = []
45
+
46
+ instructions = render_agent_instructions(
47
+ project=context.project,
48
+ profiles=list(context.profiles),
49
+ constitution_files=list(context.constitution_files),
50
+ config=context.config,
51
+ )
52
+ result = write_text_managed(
53
+ context.root / "AGENTS.md",
54
+ instructions,
55
+ root=context.root,
56
+ )
57
+ changes.append(FileChange(path=result.path, status=result.status))
58
+ if result.status != "skipped":
59
+ ignored.append("AGENTS.md")
60
+ else:
61
+ warnings.append(
62
+ "AGENTS.md contains unmanaged content and was left untouched."
63
+ )
64
+
65
+ agents_directory = context.root / ".agents" / "agents"
66
+ interactive = write_text_managed(
67
+ agents_directory / f"{INTERACTIVE_AGENT}.md",
68
+ self._render_agent(
69
+ name=INTERACTIVE_AGENT,
70
+ description=(
71
+ "DevFlow specification agent. Reads the project, asks "
72
+ "clarifying questions and writes only DevFlow specs."
73
+ ),
74
+ context=context,
75
+ interactive=True,
76
+ ),
77
+ root=context.root,
78
+ )
79
+ changes.append(
80
+ FileChange(path=interactive.path, status=interactive.status)
81
+ )
82
+ if interactive.status != "skipped":
83
+ ignored.append(f".agents/agents/{INTERACTIVE_AGENT}.md")
84
+ else:
85
+ warnings.append(
86
+ f"Existing .agents/agents/{INTERACTIVE_AGENT}.md is unmanaged "
87
+ "and was left untouched."
88
+ )
89
+
90
+ readonly = write_text_managed(
91
+ agents_directory / f"{READONLY_AGENT}.md",
92
+ self._render_agent(
93
+ name=READONLY_AGENT,
94
+ description=(
95
+ "Read-only DevFlow specification agent. Returns a complete "
96
+ "specification without modifying the project."
97
+ ),
98
+ context=context,
99
+ interactive=False,
100
+ ),
101
+ root=context.root,
102
+ )
103
+ changes.append(
104
+ FileChange(path=readonly.path, status=readonly.status)
105
+ )
106
+ if readonly.status != "skipped":
107
+ ignored.append(f".agents/agents/{READONLY_AGENT}.md")
108
+ else:
109
+ warnings.append(
110
+ f"Existing .agents/agents/{READONLY_AGENT}.md is unmanaged "
111
+ "and was left untouched."
112
+ )
113
+
114
+ if ignored:
115
+ gitignore = write_gitignore_entries(context.root, ignored)
116
+ changes.append(
117
+ FileChange(path=gitignore.path, status=gitignore.status)
118
+ )
119
+
120
+ return SetupResult(changes=tuple(changes), warnings=tuple(warnings))
121
+
122
+ def build_run(self, context: RunContext) -> Invocation:
123
+ root = context.root
124
+ settings = json.dumps(
125
+ self._settings(context),
126
+ separators=(",", ":"),
127
+ )
128
+ if context.mode == "interactive":
129
+ argv = (
130
+ self.executable,
131
+ "--settings",
132
+ settings,
133
+ "--agent",
134
+ INTERACTIVE_AGENT,
135
+ "--prompt-interactive",
136
+ context.prompt,
137
+ )
138
+ return Invocation(argv=argv, cwd=root, interactive=True)
139
+
140
+ argv = (
141
+ self.executable,
142
+ "--settings",
143
+ settings,
144
+ "--agent",
145
+ READONLY_AGENT,
146
+ "--output-format",
147
+ "text",
148
+ "--print",
149
+ context.prompt,
150
+ )
151
+ return Invocation(argv=argv, cwd=root, interactive=False)
152
+
153
+ def permission_warnings(
154
+ self,
155
+ context: RunContext,
156
+ ) -> tuple[str, ...]:
157
+ warnings: list[str] = []
158
+ if not context.permissions.allow_project_read:
159
+ warnings.append(
160
+ "Project reads are disabled; Antigravity cannot inspect the "
161
+ "codebase. DevFlow will use deterministic analysis."
162
+ )
163
+ if context.mode == "interactive" and (
164
+ context.permissions.allow_source_code_changes
165
+ ):
166
+ warnings.append(
167
+ "Antigravity can write anywhere in the project because source "
168
+ "code changes are allowed. The specification prompt still "
169
+ "forbids implementing the change."
170
+ )
171
+ if context.mode == "non-interactive" and (
172
+ context.permissions.allow_source_code_changes
173
+ ):
174
+ warnings.append(
175
+ "Antigravity print mode is read-only, so source code changes "
176
+ "are not granted for this run."
177
+ )
178
+ return tuple(warnings)
179
+
180
+ def _settings(self, context: RunContext) -> dict[str, Any]:
181
+ root = str(context.root)
182
+ allow: list[str] = []
183
+ deny: list[str] = []
184
+
185
+ if context.permissions.allow_project_read:
186
+ allow.append(f"read_file({root})")
187
+
188
+ if context.mode == "interactive":
189
+ if context.permissions.allow_source_code_changes:
190
+ allow.append(f"write_file({root})")
191
+ allow.append("command(*)")
192
+ elif context.permissions.allow_spec_write:
193
+ specs = str(Path(root) / ".devflow" / "specs")
194
+ allow.append(f"write_file({specs})")
195
+
196
+ if not context.permissions.allow_source_code_changes or (
197
+ context.mode != "interactive"
198
+ ):
199
+ deny.append("command(*)")
200
+ deny.extend(["read_url(*)", "execute_url(*)", "mcp(*)"])
201
+
202
+ if context.mode != "interactive" or not (
203
+ context.permissions.allow_spec_write
204
+ or context.permissions.allow_source_code_changes
205
+ ):
206
+ deny.append(f"write_file({root})")
207
+
208
+ return {
209
+ "trustedWorkspaces": [root],
210
+ "permissions": {"allow": allow, "deny": deny},
211
+ }
212
+
213
+ def _render_agent(
214
+ self,
215
+ *,
216
+ name: str,
217
+ description: str,
218
+ context: SetupContext,
219
+ interactive: bool,
220
+ ) -> str:
221
+ tools = list(_READ_TOOLS)
222
+ if interactive:
223
+ if (
224
+ context.permissions.allow_spec_write
225
+ or context.permissions.allow_source_code_changes
226
+ ):
227
+ tools.extend(_WRITE_TOOLS)
228
+ tools.extend(_QUESTION_TOOLS)
229
+ frontmatter = yaml.safe_dump(
230
+ {
231
+ "name": name,
232
+ "description": description,
233
+ "mainAgent": True,
234
+ "subagent": False,
235
+ "model": "inherit",
236
+ "commandExecutionPolicy": "sandbox" if interactive else "off",
237
+ "tools": tools,
238
+ },
239
+ sort_keys=False,
240
+ allow_unicode=True,
241
+ ).strip()
242
+
243
+ body = [
244
+ MANAGED_MARKER,
245
+ "# System Prompt",
246
+ "",
247
+ "You are the DevFlow specification agent for this project.",
248
+ "",
249
+ "Follow `AGENTS.md` and the project constitution. Analyze the "
250
+ "existing code before writing.",
251
+ "",
252
+ "Write only under `.devflow/specs/`. Never modify application "
253
+ "source code while generating a specification.",
254
+ "",
255
+ ]
256
+ if interactive:
257
+ body.extend(
258
+ [
259
+ "During interactive Discovery, call the `ask_question` tool for "
260
+ "every pending question and every assumption acceptance. "
261
+ "Present the recorded options in the dialog instead of asking "
262
+ "in free-form prose, and wait for the user's selection before "
263
+ "recording an answer.",
264
+ "",
265
+ ]
266
+ )
267
+ else:
268
+ body.extend(
269
+ [
270
+ "This run is non-interactive. Do not ask questions and do not "
271
+ "write files. Return the complete result as your final message.",
272
+ "",
273
+ ]
274
+ )
275
+ body.extend(
276
+ [
277
+ "The complete task, target path and output contract are provided "
278
+ "in the user prompt for each run.",
279
+ "",
280
+ ]
281
+ )
282
+ return f"---\n{frontmatter}\n---\n\n" + "\n".join(body)
@@ -190,10 +190,25 @@ class OpenCodeAdapter(HarnessAdapter):
190
190
  "Write only under `.devflow/specs/`. Never modify application "
191
191
  "source code while generating a specification.",
192
192
  "",
193
- "The complete task, target path and output contract are provided "
194
- "in the user prompt for each run.",
195
- "",
196
193
  ]
194
+ if interactive:
195
+ body.extend(
196
+ [
197
+ "During interactive Discovery, call the `question` tool for "
198
+ "every pending question and every assumption acceptance. "
199
+ "Present the recorded options in the dialog instead of asking "
200
+ "in free-form prose, and wait for the user's selection before "
201
+ "recording an answer.",
202
+ "",
203
+ ]
204
+ )
205
+ body.extend(
206
+ [
207
+ "The complete task, target path and output contract are provided "
208
+ "in the user prompt for each run.",
209
+ "",
210
+ ]
211
+ )
197
212
  return f"---\n{frontmatter}\n---\n\n" + "\n".join(body)
198
213
 
199
214
  def _permissions(
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from devflow.adapters.antigravity import AntigravityAdapter
5
6
  from devflow.adapters.base import HarnessAdapter
6
7
  from devflow.adapters.claude_code import ClaudeCodeAdapter
7
8
  from devflow.adapters.codex import CodexAdapter
@@ -16,6 +17,7 @@ def _create_registry() -> dict[str, HarnessAdapter]:
16
17
  OpenCodeAdapter(),
17
18
  ClaudeCodeAdapter(),
18
19
  KiroAdapter(),
20
+ AntigravityAdapter(),
19
21
  ]
20
22
  return {adapter.name: adapter for adapter in adapters}
21
23
 
@@ -35,7 +35,7 @@ def version() -> None:
35
35
  try:
36
36
  current_version = package_version("devflow-toolkit")
37
37
  except PackageNotFoundError:
38
- current_version = "0.3.13"
38
+ current_version = "0.3.15"
39
39
  console.print(f"DevFlow v{current_version}")
40
40
 
41
41
 
@@ -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.13. "
60
+ f"Stage '{stage}' is not available in DevFlow 0.3.15. "
61
61
  "Only the 'spec' stage can be approved."
62
62
  )
63
63
  raise UnsupportedStageError(msg)
@@ -55,7 +55,8 @@ def resolve_harness(
55
55
  if not names:
56
56
  msg = (
57
57
  "No supported agent harness was found on PATH. Install a harness "
58
- "(codex, opencode, claude-code or kiro) or pass --harness none / "
58
+ "(codex, opencode, claude-code, kiro or antigravity) or pass "
59
+ "--harness none / "
59
60
  "--no-agent to use deterministic static analysis explicitly."
60
61
  )
61
62
  raise ConfigError(msg)
@@ -76,7 +76,8 @@ def init(
76
76
  None,
77
77
  "--harness",
78
78
  help=(
79
- "Agent harness: auto, codex, opencode, claude-code, kiro or none."
79
+ "Agent harness: auto, codex, opencode, claude-code, kiro, "
80
+ "antigravity or none."
80
81
  ),
81
82
  ),
82
83
  mode: Optional[str] = typer.Option(