devflow-toolkit 0.3.20__tar.gz → 0.3.22__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 (84) hide show
  1. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/CHANGELOG.md +53 -0
  2. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/PKG-INFO +70 -17
  3. devflow_toolkit-0.3.22/PUBLISHING.md +155 -0
  4. devflow_toolkit-0.3.22/README.md +149 -0
  5. devflow_toolkit-0.3.20/README.md → devflow_toolkit-0.3.22/docs/REFERENCE.md +69 -16
  6. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/pyproject.toml +4 -2
  7. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/instructions.py +2 -2
  8. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/cli.py +2 -0
  9. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/approve.py +5 -2
  10. devflow_toolkit-0.3.22/src/devflow/commands/reopen.py +105 -0
  11. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/status.py +58 -1
  12. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/spec_workflow.py +6 -0
  13. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/__init__.py +2 -0
  14. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/events.py +58 -0
  15. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/manager.py +103 -1
  16. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/prompts/__init__.py +12 -0
  17. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/prompts/discovery.md +1 -1
  18. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_discovery.py +4 -0
  19. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_event_log.py +48 -0
  20. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_spec_workflow.py +18 -0
  21. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_state.py +99 -1
  22. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/.gitignore +0 -0
  23. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/LICENSE +0 -0
  24. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/__init__.py +0 -0
  25. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/__init__.py +0 -0
  26. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/agents.py +0 -0
  27. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/antigravity.py +0 -0
  28. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/base.py +0 -0
  29. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/claude_code.py +0 -0
  30. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/codex.py +0 -0
  31. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/detector.py +0 -0
  32. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/kiro.py +0 -0
  33. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/opencode.py +0 -0
  34. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/adapters/registry.py +0 -0
  35. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/__init__.py +0 -0
  36. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/config.py +0 -0
  37. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/doctor.py +0 -0
  38. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/harness.py +0 -0
  39. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/init.py +0 -0
  40. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/recover.py +0 -0
  41. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/commands/spec.py +0 -0
  42. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/__init__.py +0 -0
  43. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/architecture.py +0 -0
  44. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/artifacts/__init__.py +0 -0
  45. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/artifacts/errors.py +0 -0
  46. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/artifacts/models.py +0 -0
  47. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/artifacts/store.py +0 -0
  48. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/clock.py +0 -0
  49. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/config.py +0 -0
  50. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/constitution.py +0 -0
  51. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/discovery.py +0 -0
  52. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/file_types.py +0 -0
  53. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/ports.py +0 -0
  54. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/profile_manager.py +0 -0
  55. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/project.py +0 -0
  56. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/recovery.py +0 -0
  57. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/specification.py +0 -0
  58. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/errors.py +0 -0
  59. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/locator.py +0 -0
  60. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/lock.py +0 -0
  61. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/models.py +0 -0
  62. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/core/state/transitions.py +0 -0
  63. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/models/__init__.py +0 -0
  64. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/models/profile.py +0 -0
  65. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/models/project.py +0 -0
  66. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
  67. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
  68. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/base/constitution/architecture.md +0 -0
  69. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
  70. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/base/constitution/constitution.md +0 -0
  71. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/base/profile.yaml +0 -0
  72. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
  73. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/django-backend/profile.yaml +0 -0
  74. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
  75. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
  76. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/prompts/discovery-repair.md +0 -0
  77. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/src/devflow/prompts/spec.md +0 -0
  78. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_cli.py +0 -0
  79. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_discovery_decisions.py +0 -0
  80. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_greenfield.py +0 -0
  81. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_hardening.py +0 -0
  82. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_harness_adapters.py +0 -0
  83. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_recovery.py +0 -0
  84. {devflow_toolkit-0.3.20 → devflow_toolkit-0.3.22}/tests/test_state_replay.py +0 -0
@@ -2,6 +2,59 @@
2
2
 
3
3
  All notable changes to DevFlow Toolkit are documented in this file.
4
4
 
5
+ ## 0.3.22 - 2026-11-09
6
+
7
+ ### Added
8
+
9
+ - `devflow reopen 001` withdraws the approval of a specification so it
10
+ can be changed. It asks for confirmation (`--yes` skips it), archives
11
+ the current `spec.md` in `history/` and records a `spec_reopened`
12
+ event. The change returns to `draft`.
13
+ - `devflow reopen 001 --discovery` also marks Discovery pending and
14
+ returns the change to `awaiting_clarification`. The next Discovery
15
+ session asks the user what to add or change.
16
+ - `PUBLISHING.md` explains, step by step, how to publish a release on
17
+ TestPyPI and PyPI.
18
+
19
+ ### Changed
20
+
21
+ - `README.md` is now a short guide focused on the command flow. The full
22
+ documentation moved to `docs/REFERENCE.md`, which remains the PyPI
23
+ project description.
24
+ - `devflow status` suggests `devflow reopen` for an approved spec that
25
+ was edited, instead of `devflow doctor`.
26
+ - The generated `AGENTS.md` tells agents to ask for `devflow reopen`
27
+ instead of editing an approved spec.
28
+
29
+ ### Package
30
+
31
+ - Package version is `0.3.22`.
32
+
33
+ ## 0.3.21 - 2026-11-09
34
+
35
+ ### Added
36
+
37
+ - `devflow status` ends with a `Next:` line: continue Discovery,
38
+ approve the validated spec, implement the approved spec with a coding
39
+ agent, or run `devflow doctor` when an artifact is stale or orphaned.
40
+
41
+ ### Changed
42
+
43
+ - `devflow approve 001` is the documented form. `--stage` remains
44
+ optional and defaults to `spec`.
45
+ - `devflow status` marks a blocked state in the status line, for
46
+ example `spec_approved (blocked: spec (stale))`, instead of showing it
47
+ as a plain approved change.
48
+
49
+ ### Fixed
50
+
51
+ - The unsupported-stage error of `devflow approve` no longer names the
52
+ stale version `0.3.17`.
53
+
54
+ ### Package
55
+
56
+ - Package version is `0.3.21`.
57
+
5
58
  ## 0.3.20 - 2026-11-09
6
59
 
7
60
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.20
3
+ Version: 0.3.22
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.3.20`.**
35
+ **Current version: `0.3.22`.**
36
36
 
37
37
  DevFlow is a command-line toolkit for leading AI models and coding
38
38
  agents through specification-driven changes in real software projects.
@@ -152,7 +152,7 @@ pip install devflow-toolkit
152
152
  To install a specific built artifact instead:
153
153
 
154
154
  ```bash
155
- pip install devflow_toolkit-0.3.20-py3-none-any.whl
155
+ pip install devflow_toolkit-0.3.22-py3-none-any.whl
156
156
  ```
157
157
 
158
158
  Verify the installation:
@@ -207,7 +207,7 @@ devflow spec --continue 001
207
207
 
208
208
  ```bash
209
209
  devflow status 001
210
- devflow approve 001 --stage spec
210
+ devflow approve 001
211
211
  ```
212
212
 
213
213
  7. Start the next change. The stored language and model are reused:
@@ -428,7 +428,7 @@ as an architectural constraint when it is present.
428
428
 
429
429
  ### Harnesses
430
430
 
431
- | Harness | Status in 0.3.20 |
431
+ | Harness | Status in 0.3.22 |
432
432
  | --- | --- |
433
433
  | OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
434
434
  | Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
@@ -642,7 +642,7 @@ While any decision is pending or any assumption remains unaccepted:
642
642
 
643
643
  - `discovery.yaml` and `context.md` are written;
644
644
  - no `spec.md` is generated;
645
- - `devflow approve --stage spec` refuses the change;
645
+ - `devflow approve` refuses the change;
646
646
  - the workflow status is `awaiting_clarification`.
647
647
 
648
648
  `context.md` is the single generated context file. Its
@@ -680,7 +680,7 @@ A generated specification is valid only when section 7 is exactly
680
680
  did not cover, DevFlow rejects the generated document, archives it,
681
681
  appends the question to `discovery.yaml`, and returns the change to
682
682
  `awaiting_clarification`. The question must be answered before a new
683
- specification is generated. `devflow approve --stage spec` rejects a
683
+ specification is generated. `devflow approve` rejects a
684
684
  specification that still lists open questions.
685
685
 
686
686
  ## Workflow
@@ -696,13 +696,14 @@ specification that still lists open questions.
696
696
  8. If artifacts exist without workflow state, diagnose with
697
697
  `devflow doctor <id>` and repair with `devflow recover <id>`.
698
698
 
699
- Available commands in `0.3.20`:
699
+ Available commands in `0.3.22`:
700
700
 
701
701
  | Command | Status |
702
702
  | --- | --- |
703
703
  | `devflow init` | Implemented |
704
704
  | `devflow spec` | Implemented: Discovery, specification, and `--continue` |
705
- | `devflow approve <id> --stage spec` | Implemented |
705
+ | `devflow approve <id>` (stage `spec` by default) | Implemented |
706
+ | `devflow reopen <id>` | Implemented: withdraw a spec approval to change it |
706
707
  | `devflow status <id>` | Implemented |
707
708
  | `devflow doctor <id>` | Implemented: read-only diagnostics |
708
709
  | `devflow recover <id>` | Implemented: register existing artifacts |
@@ -856,6 +857,21 @@ devflow status 001-add-a-get-patients-endpoint
856
857
  approvals, stale artifacts and orphan files. It reconciles
857
858
  `workflow.yaml` from `events.jsonl` before reporting.
858
859
 
860
+ It ends with a `Next:` line:
861
+
862
+ | State | Next |
863
+ | --- | --- |
864
+ | Discovery pending | `devflow spec --continue 001` |
865
+ | Specification validated | review `spec.md`, then `devflow approve 001` |
866
+ | Specification approved | ask your coding agent to implement `spec.md` |
867
+ | Stale artifact or orphan file | `devflow doctor 001` |
868
+
869
+ A stale artifact also appears in the status line, for example
870
+ `spec_approved (blocked: spec (stale))`.
871
+
872
+ Use `status` day to day. `doctor` is for a change that `status` reports
873
+ as blocked, or that has files on disk without workflow state.
874
+
859
875
  ### Diagnose and recover a change
860
876
 
861
877
  If `context.md`, `discovery.yaml` or `spec.md` were written outside
@@ -899,7 +915,7 @@ Recovery does not bypass review. After recovering, inspect
899
915
  `devflow status 001`, then approve explicitly:
900
916
 
901
917
  ```bash
902
- devflow approve 001 --stage spec
918
+ devflow approve 001
903
919
  ```
904
920
 
905
921
  If Discovery is incomplete or `spec.md` is invalid, `recover` refuses to
@@ -909,11 +925,11 @@ register the artifacts and names the problem. Resolve it with
909
925
  ### Approve the specification
910
926
 
911
927
  ```bash
912
- devflow approve 001 --stage spec
928
+ devflow approve 001
913
929
  ```
914
930
 
915
931
  Approval is explicit and binds the decision to the current artifact
916
- digests. For a `0.3.20` change it binds `spec.md`, `discovery.yaml` and,
932
+ digests. For a `0.3.22` change it binds `spec.md`, `discovery.yaml` and,
917
933
  when a manifest applies, the architecture manifest digest. Repeating the
918
934
  same approval is a no-op. If an artifact changes after validation,
919
935
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -924,8 +940,9 @@ and names the pending questions and assumptions. Approval also rejects a
924
940
  specification whose section 7 still lists open questions. Legacy `0.2.0`
925
941
  changes without `discovery.yaml` remain approvable with a warning.
926
942
 
927
- Only the `spec` stage is available in `0.3.20`. `--stage plan` and
928
- `--stage review` are rejected. There are no `plan`, `implement` or
943
+ Only the `spec` stage is available in `0.3.22`, so `--stage` is optional
944
+ and defaults to `spec`. `--stage plan` and `--stage review` are
945
+ rejected. There are no `plan`, `implement` or
929
946
  `review` commands in this release.
930
947
 
931
948
  ### Implement an approved specification
@@ -951,6 +968,41 @@ The generated `AGENTS.md` (or `CLAUDE.md`) tells the agent to:
951
968
  this step. Discovery and specification prompts skip it to save tokens;
952
969
  the specification still lists it in section 9.
953
970
 
971
+ ### Reopen an approved specification
972
+
973
+ An approved specification is a contract. To change it, reopen it first;
974
+ editing `spec.md` directly only marks it `stale`.
975
+
976
+ ```bash
977
+ devflow reopen 001 # fix or extend the spec text yourself
978
+ devflow reopen 001 --discovery # add or change decisions with the agent
979
+ ```
980
+
981
+ `reopen` asks for confirmation (skip it with `--yes`), copies the
982
+ current `spec.md` into `history/`, records a `spec_reopened` event and
983
+ withdraws the approval. The previous approval stays in `events.jsonl`;
984
+ nothing is deleted.
985
+
986
+ Without `--discovery`, the change returns to `draft`:
987
+
988
+ ```bash
989
+ # edit spec.md
990
+ devflow spec --continue 001 # validates and registers your edited spec
991
+ devflow approve 001
992
+ ```
993
+
994
+ With `--discovery`, the change returns to `awaiting_clarification` and
995
+ Discovery is marked pending:
996
+
997
+ ```bash
998
+ devflow spec --continue 001 # Discovery session: tell the agent what changes
999
+ devflow spec --continue 001 # writes the new spec
1000
+ devflow approve 001
1001
+ ```
1002
+
1003
+ Only an approved spec can be reopened, and only while the change is in
1004
+ `spec_approved`.
1005
+
954
1006
  ## Generated files
955
1007
 
956
1008
  ```text
@@ -990,12 +1042,13 @@ DevFlow rebuilds or rejects it rather than trusting it.
990
1042
 
991
1043
  ```text
992
1044
  generated -> validated -> approved
993
- | |
994
- +-> rejected +-> stale
1045
+ | | |
1046
+ +-> rejected +-> stale +-> reopen -> validated
995
1047
  ```
996
1048
 
997
1049
  - An approval stores the artifact kind and its SHA-256 digest.
998
- - Editing an approved artifact makes it stale.
1050
+ - Editing an approved artifact makes it stale. Use `devflow reopen` to
1051
+ withdraw the approval and change it on purpose.
999
1052
  - A stale, unvalidated or orphan artifact cannot be approved.
1000
1053
  - Semantic validation rejects malformed or inconsistent histories.
1001
1054
  - Artifact and state writes are atomic; a failed write does not leave a
@@ -0,0 +1,155 @@
1
+ # Cómo publicar una versión en PyPI
2
+
3
+ Guía paso a paso para publicar `devflow-toolkit` en **TestPyPI** (prueba)
4
+ y luego en **PyPI** (real). Todos los comandos se ejecutan desde la raíz
5
+ del repositorio.
6
+
7
+ ```text
8
+ rama → tests → versión → commit → build → TestPyPI → probar → PyPI → push
9
+ ```
10
+
11
+ ## Antes de empezar (solo la primera vez)
12
+
13
+ 1. Ten cuenta en [pypi.org](https://pypi.org) y en
14
+ [test.pypi.org](https://test.pypi.org). Son cuentas separadas.
15
+ 2. En cada sitio crea un **API token** (Account settings → API tokens).
16
+ 3. Guarda los tokens en `.pypirc`, en la raíz del repositorio:
17
+
18
+ ```ini
19
+ [distutils]
20
+ index-servers =
21
+ pypi
22
+ testpypi
23
+
24
+ [pypi]
25
+ username = __token__
26
+ password = pypi-XXXXXXXX
27
+
28
+ [testpypi]
29
+ repository = https://test.pypi.org/legacy/
30
+ username = __token__
31
+ password = pypi-YYYYYYYY
32
+ ```
33
+
34
+ ```bash
35
+ chmod 600 .pypirc
36
+ ```
37
+
38
+ `.pypirc` ya está en `.gitignore`. **Nunca lo subas a git.**
39
+
40
+ 4. Instala las herramientas de desarrollo:
41
+
42
+ ```bash
43
+ python -m venv .venv
44
+ source .venv/bin/activate
45
+ pip install -e ".[dev]"
46
+ ```
47
+
48
+ ## 1. Crea una rama
49
+
50
+ ```bash
51
+ git switch -c feat/mi-cambio
52
+ ```
53
+
54
+ ## 2. Comprueba que todo pasa
55
+
56
+ ```bash
57
+ .venv/bin/pytest -q
58
+ .venv/bin/ruff check src tests
59
+ ```
60
+
61
+ No sigas si algo falla.
62
+
63
+ ## 3. Sube la versión
64
+
65
+ PyPI **no acepta dos veces la misma versión**. Cambia el número (por
66
+ ejemplo `0.3.22` → `0.3.23`) en:
67
+
68
+ | Archivo | Qué cambiar |
69
+ | --- | --- |
70
+ | `pyproject.toml` | `version = "0.3.23"` |
71
+ | `README.md` | `Current version: 0.3.23` |
72
+ | `docs/REFERENCE.md` | Todas las menciones de la versión anterior |
73
+ | `CHANGELOG.md` | Nueva sección `## 0.3.23 - AAAA-MM-DD` arriba |
74
+
75
+ Atajo para los dos primeros documentos:
76
+
77
+ ```bash
78
+ sed -i 's/0\.3\.22/0.3.23/g' README.md docs/REFERENCE.md
79
+ ```
80
+
81
+ ## 4. Haz commit
82
+
83
+ ```bash
84
+ git add -A
85
+ git commit -m "describe el cambio y versión 0.3.23"
86
+ ```
87
+
88
+ ## 5. Construye el paquete
89
+
90
+ ```bash
91
+ .venv/bin/python -m build
92
+ .venv/bin/twine check dist/*0.3.23*
93
+ ```
94
+
95
+ Se crean dos archivos en `dist/`: un `.whl` y un `.tar.gz`. `twine check`
96
+ debe decir `PASSED` en ambos.
97
+
98
+ ## 6. Publica en TestPyPI
99
+
100
+ ```bash
101
+ .venv/bin/twine upload --config-file .pypirc -r testpypi dist/*0.3.23*
102
+ ```
103
+
104
+ Usa siempre `dist/*0.3.23*` para no subir versiones viejas que sigan en
105
+ `dist/`.
106
+
107
+ ## 7. Prueba la instalación desde TestPyPI
108
+
109
+ ```bash
110
+ python3 -m venv /tmp/prueba
111
+ /tmp/prueba/bin/pip install --no-cache-dir \
112
+ --index-url https://test.pypi.org/simple/ \
113
+ --extra-index-url https://pypi.org/simple/ \
114
+ devflow-toolkit==0.3.23
115
+ /tmp/prueba/bin/devflow version
116
+ rm -rf /tmp/prueba
117
+ ```
118
+
119
+ Debe mostrar `DevFlow v0.3.23`. Si dice que no encuentra la versión,
120
+ espera uno o dos minutos y repite: TestPyPI tarda en actualizar su
121
+ índice.
122
+
123
+ ## 8. Publica en PyPI
124
+
125
+ Solo si el paso 7 funcionó:
126
+
127
+ ```bash
128
+ .venv/bin/twine upload --config-file .pypirc -r pypi dist/*0.3.23*
129
+ ```
130
+
131
+ La página queda en `https://pypi.org/project/devflow-toolkit/0.3.23/`.
132
+
133
+ ## 9. Sube la rama
134
+
135
+ ```bash
136
+ git push -u origin feat/mi-cambio
137
+ ```
138
+
139
+ Abre un Pull Request en GitHub para unirla a `main`.
140
+
141
+ ## Errores frecuentes
142
+
143
+ | Mensaje | Qué hacer |
144
+ | --- | --- |
145
+ | `File already exists` | Esa versión ya se publicó. Sube el número (paso 3) y repite. |
146
+ | `403 Forbidden` / `Invalid API token` | El token de `.pypirc` está mal o es del sitio equivocado (PyPI y TestPyPI usan tokens distintos). |
147
+ | `No matching distribution found` en el paso 7 | TestPyPI aún no actualizó el índice. Espera y repite. |
148
+ | `twine check` falla | Revisa el formato Markdown del archivo `readme` indicado en `pyproject.toml`. |
149
+
150
+ ## Bueno saber
151
+
152
+ - La descripción larga que se ve en PyPI sale del archivo indicado en
153
+ `readme` de `pyproject.toml` (hoy `docs/REFERENCE.md`).
154
+ - Una versión publicada no se puede reemplazar ni reutilizar, aunque la
155
+ borres. Por eso se prueba primero en TestPyPI.
@@ -0,0 +1,149 @@
1
+ # DevFlow Toolkit
2
+
3
+ DevFlow is a command-line tool that makes AI coding agents work from an
4
+ approved specification instead of a vague chat request.
5
+
6
+ - **You decide first.** The agent asks the questions that matter
7
+ (Discovery) and writes a specification (`spec.md`). You approve it.
8
+ - **The agent builds what was approved.** Nothing more, nothing less.
9
+ - **Everything stays in your repository.** Decisions, the spec and its
10
+ approval live in `.devflow/`, so any agent or teammate can pick up
11
+ the work.
12
+
13
+ Current version: `0.3.22` · Python 3.11+ · Linux and macOS
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install devflow-toolkit
19
+ devflow version
20
+ ```
21
+
22
+ You also need an AI agent installed on your machine, for example
23
+ [OpenCode](https://opencode.ai) or Claude Code.
24
+
25
+ ## The flow
26
+
27
+ ```text
28
+ devflow init once per project
29
+ │
30
+ devflow spec "your change" Discovery: the agent asks, you answer
31
+ │
32
+ devflow spec --continue 001 repeat until the spec is written
33
+ │
34
+ devflow approve 001 you approve the spec
35
+ │
36
+ "Implement .devflow/specs/001-…/spec.md" ask your agent to build it
37
+
38
+ Need to change an approved spec? devflow reopen 001
39
+ Not sure what comes next? devflow status 001
40
+ ```
41
+
42
+ ## Step by step
43
+
44
+ ### 1. Set up the project (once)
45
+
46
+ ```bash
47
+ cd my-project
48
+ devflow init --harness opencode --language es
49
+ ```
50
+
51
+ `--harness` is the agent DevFlow will open (`opencode`, `claude-code`,
52
+ `codex`, `antigravity`, `kiro`). `--language` is the language of the
53
+ questions and the spec.
54
+
55
+ ### 2. Describe the change
56
+
57
+ ```bash
58
+ devflow spec "Add a contact form"
59
+ ```
60
+
61
+ DevFlow opens a chat with the agent. Answer its questions. When the
62
+ agent says Discovery is done, **exit the chat** (for example `/exit`).
63
+ DevFlow then checks the answers on your machine, without spending
64
+ tokens.
65
+
66
+ ### 3. Continue until the spec is written
67
+
68
+ ```bash
69
+ devflow spec --continue 001
70
+ ```
71
+
72
+ Each command opens at most one chat. Run it again if there are pending
73
+ questions, and once more to write `spec.md`. Exit the chat only after
74
+ the agent says `spec.md` is written.
75
+
76
+ Prefer one command for both phases? Add `--auto` to the first command:
77
+ `devflow spec "Add a contact form" --auto`.
78
+
79
+ ### 4. Review and approve
80
+
81
+ Read `.devflow/specs/001-…/spec.md`, then:
82
+
83
+ ```bash
84
+ devflow approve 001
85
+ ```
86
+
87
+ ### 5. Implement
88
+
89
+ Open your agent normally (not through DevFlow) and ask:
90
+
91
+ ```text
92
+ Implement .devflow/specs/001-add-a-contact-form/spec.md
93
+ ```
94
+
95
+ The `AGENTS.md` file created by `devflow init` tells the agent to check
96
+ the approval, follow your code standards, build only the listed
97
+ requirements and report every acceptance criterion.
98
+
99
+ ### 6. Change an approved spec (if needed)
100
+
101
+ ```bash
102
+ devflow reopen 001 # you edit spec.md yourself
103
+ devflow reopen 001 --discovery # the agent asks about the new decisions
104
+ ```
105
+
106
+ Then run `devflow spec --continue 001` and approve again. The previous
107
+ version is kept in `history/`.
108
+
109
+ ## Everyday commands
110
+
111
+ | Command | What it does |
112
+ | --- | --- |
113
+ | `devflow init` | Prepare the project and the agent integration |
114
+ | `devflow spec "…"` | Start a change with Discovery |
115
+ | `devflow spec --continue 001` | Resume Discovery or write the spec |
116
+ | `devflow approve 001` | Approve the spec |
117
+ | `devflow reopen 001` | Withdraw the approval to change the spec |
118
+ | `devflow status 001` | Show where the change is and the next command |
119
+
120
+ ## When something looks wrong
121
+
122
+ `devflow status 001` always ends with a `Next:` line. If it suggests
123
+ `devflow doctor 001`, run it: `doctor` explains the problem and, when
124
+ possible, suggests `devflow recover 001` to register files that were
125
+ written outside the normal flow.
126
+
127
+ ## Good to know
128
+
129
+ - **Validation is free.** DevFlow checks Discovery and the spec with
130
+ local Python code; it does not call the model to do it.
131
+ - **Fewer wasted tokens.** Questions are cheap; rewriting code after a
132
+ misunderstanding is expensive. An approved spec avoids most of those
133
+ rewrites.
134
+ - **Small changes don't need DevFlow.** Use it when a change involves
135
+ decisions: new features, integrations, refactors.
136
+ - **Without a chat.** `--mode non-interactive` runs the agent in the
137
+ background. It cannot ask questions, so use it once decisions are
138
+ made.
139
+
140
+ ## Learn more
141
+
142
+ - [Full reference](docs/REFERENCE.md): every command, option, file and
143
+ rule.
144
+ - [Changelog](CHANGELOG.md)
145
+ - [How to publish a release](PUBLISHING.md)
146
+
147
+ ## License
148
+
149
+ MIT