devflow-toolkit 0.3.27__tar.gz → 0.3.28__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 (92) hide show
  1. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/CHANGELOG.md +23 -0
  2. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/PKG-INFO +71 -13
  3. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/README.md +36 -12
  4. devflow_toolkit-0.3.28/docs/DEMO.md +159 -0
  5. devflow_toolkit-0.3.28/docs/PRESENTATION.md +155 -0
  6. devflow_toolkit-0.3.28/docs/PUBLISHING.md +266 -0
  7. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/docs/REFERENCE.md +70 -12
  8. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/pyproject.toml +1 -2
  9. devflow_toolkit-0.3.27/PUBLISHING.md +0 -155
  10. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/.gitignore +0 -0
  11. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/LICENSE +0 -0
  12. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/__init__.py +0 -0
  13. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/__init__.py +0 -0
  14. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/agents.py +0 -0
  15. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/antigravity.py +0 -0
  16. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/base.py +0 -0
  17. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/claude_code.py +0 -0
  18. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/codex.py +0 -0
  19. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/detector.py +0 -0
  20. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/instructions.py +0 -0
  21. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/kiro.py +0 -0
  22. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/opencode.py +0 -0
  23. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/adapters/registry.py +0 -0
  24. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/cli.py +0 -0
  25. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/__init__.py +0 -0
  26. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/approve.py +0 -0
  27. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/config.py +0 -0
  28. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/doctor.py +0 -0
  29. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/harness.py +0 -0
  30. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/init.py +0 -0
  31. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/recover.py +0 -0
  32. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/reopen.py +0 -0
  33. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/security.py +0 -0
  34. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/spec.py +0 -0
  35. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/commands/status.py +0 -0
  36. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/__init__.py +0 -0
  37. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/architecture.py +0 -0
  38. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/__init__.py +0 -0
  39. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/errors.py +0 -0
  40. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/models.py +0 -0
  41. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/store.py +0 -0
  42. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/clock.py +0 -0
  43. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/config.py +0 -0
  44. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/constitution.py +0 -0
  45. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/discovery.py +0 -0
  46. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/file_types.py +0 -0
  47. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/ports.py +0 -0
  48. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/profile_manager.py +0 -0
  49. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/project.py +0 -0
  50. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/recovery.py +0 -0
  51. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/security_tools.py +0 -0
  52. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/spec_workflow.py +0 -0
  53. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/specification.py +0 -0
  54. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/__init__.py +0 -0
  55. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/errors.py +0 -0
  56. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/events.py +0 -0
  57. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/locator.py +0 -0
  58. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/lock.py +0 -0
  59. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/manager.py +0 -0
  60. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/models.py +0 -0
  61. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/core/state/transitions.py +0 -0
  62. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/hooks/__init__.py +0 -0
  63. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/hooks/claude_guard.py +0 -0
  64. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/models/__init__.py +0 -0
  65. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/models/profile.py +0 -0
  66. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/models/project.py +0 -0
  67. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
  68. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
  69. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/constitution/architecture.md +0 -0
  70. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
  71. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/constitution/constitution.md +0 -0
  72. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/profile.yaml +0 -0
  73. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
  74. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/django-backend/profile.yaml +0 -0
  75. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
  76. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
  77. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/prompts/__init__.py +0 -0
  78. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/prompts/discovery-repair.md +0 -0
  79. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/prompts/discovery.md +0 -0
  80. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/src/devflow/prompts/spec.md +0 -0
  81. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_cli.py +0 -0
  82. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_discovery.py +0 -0
  83. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_discovery_decisions.py +0 -0
  84. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_event_log.py +0 -0
  85. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_greenfield.py +0 -0
  86. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_hardening.py +0 -0
  87. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_harness_adapters.py +0 -0
  88. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_recovery.py +0 -0
  89. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_security_tools.py +0 -0
  90. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_spec_workflow.py +0 -0
  91. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_state.py +0 -0
  92. {devflow_toolkit-0.3.27 → devflow_toolkit-0.3.28}/tests/test_state_replay.py +0 -0
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to DevFlow Toolkit are documented in this file.
4
4
 
5
+ ## 0.3.28 - 2026-11-09
6
+
7
+ ### Changed
8
+
9
+ - The PyPI description (`docs/REFERENCE.md`) now opens with the new
10
+ introduction (why DevFlow trades code rounds for question rounds),
11
+ the install command and the command flow, before the full reference.
12
+ - The publishing manual moved to `docs/PUBLISHING.md` and was rewritten
13
+ step by step for TestPyPI and PyPI.
14
+
15
+ ### Added
16
+
17
+ - `docs/PRESENTATION.md`: a one-page presentation for a development
18
+ team, with the problem, the solution, a pilot proposal, limitations
19
+ and common questions (in Spanish).
20
+ - `docs/DEMO.md`: how to prepare the example project and run a
21
+ 10-minute live demo, with a plan B and how to reset afterwards (in
22
+ Spanish).
23
+
24
+ ### Package
25
+
26
+ - Package version is `0.3.28`.
27
+
5
28
  ## 0.3.27 - 2026-11-09
6
29
 
7
30
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-toolkit
3
- Version: 0.3.27
3
+ Version: 0.3.28
4
4
  Summary: Specification workflow toolkit for AI-assisted software changes
5
5
  Author: DevFlow contributors
6
6
  License-Expression: MIT
@@ -32,17 +32,75 @@ Description-Content-Type: text/markdown
32
32
 
33
33
  # DevFlow Toolkit
34
34
 
35
- **Current version: `0.3.27`.**
35
+ **Current version: `0.3.28`.**
36
+
37
+ Before any code is written, you and the AI agree on what will be built
38
+ and approve it as a spec. The agent then implements once, on something
39
+ clear, instead of trying, failing and redoing. Questions are cheap;
40
+ redoing code is expensive.
41
+
42
+ **The expensive part of an agent is not writing, it is correcting.**
43
+ Give it something ambiguous and it explores the whole repository, writes
44
+ code and tests, you reject it, and it starts again with an ever larger
45
+ context. Every round costs more than the last, and it is paid in output
46
+ tokens, which cost several times more than input tokens.
47
+
48
+ **DevFlow trades code rounds for question rounds.**
49
+
50
+ - **Discovery asks first.** Authentication, permissions, validation,
51
+ what stays out of scope. These rounds are cheap: mostly reading, no
52
+ code.
53
+ - **Validation spends no tokens.** DevFlow checks that Discovery is
54
+ complete and that the spec has the right shape with local Python
55
+ code.
56
+ - **The approved spec guides the agent.** It says which files to touch,
57
+ which requirements to meet (`FR`) and how to prove it is done (`AC`).
58
+ The agent explores less, stays in scope and writes nothing nobody
59
+ asked for.
60
+ - **Each phase reads only what it needs.** Code style rules are loaded
61
+ when implementing, not while specifying.
62
+ - **Context is never lost.** Everything stays in your repository, in a
63
+ few files under `.devflow/`. Switch sessions or agents and there is
64
+ nothing to explain again.
65
+
66
+ The goal is not to generate code faster, but to decide better before
67
+ generating it. Thinking is cheap; redoing code is expensive.
68
+
69
+ ## Install
70
+
71
+ ```bash
72
+ pip install devflow-toolkit
73
+ devflow version
74
+ ```
75
+
76
+ You also need an AI agent installed on your machine, for example
77
+ [OpenCode](https://opencode.ai) or Claude Code.
78
+
79
+ ## The flow
80
+
81
+ ```text
82
+ devflow init once per project
83
+ │
84
+ devflow spec "your change" Discovery: the agent asks, you answer
85
+ │
86
+ devflow spec --continue 001 repeat until the spec is written
87
+ │
88
+ devflow approve 001 you approve the spec
89
+ │
90
+ "Implement .devflow/specs/001-…/spec.md" ask your agent to build it
91
+
92
+ Need to change an approved spec? devflow reopen 001
93
+ Not sure what comes next? devflow status 001
94
+ ```
95
+
96
+ The rest of this page is the full reference: every command, option,
97
+ file and rule.
98
+
99
+ ## What DevFlow covers
36
100
 
37
101
  DevFlow is a command-line toolkit for leading AI models and coding
38
102
  agents through specification-driven changes in real software projects.
39
103
 
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
104
  Discovery is the centre of that process. It is not a one-shot chat or a
47
105
  form to fill in; it is a joint exploration between the human team and the
48
106
  AI model. Both review the project, ask questions, challenge assumptions
@@ -152,7 +210,7 @@ pip install devflow-toolkit
152
210
  To install a specific built artifact instead:
153
211
 
154
212
  ```bash
155
- pip install devflow_toolkit-0.3.27-py3-none-any.whl
213
+ pip install devflow_toolkit-0.3.28-py3-none-any.whl
156
214
  ```
157
215
 
158
216
  Verify the installation:
@@ -457,7 +515,7 @@ as an architectural constraint when it is present.
457
515
 
458
516
  ### Harnesses
459
517
 
460
- | Harness | Status in 0.3.27 |
518
+ | Harness | Status in 0.3.28 |
461
519
  | --- | --- |
462
520
  | OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
463
521
  | Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
@@ -818,7 +876,7 @@ for each item; the agent does not write it.
818
876
  8. If artifacts exist without workflow state, diagnose with
819
877
  `devflow doctor <id>` and repair with `devflow recover <id>`.
820
878
 
821
- Available commands in `0.3.27`:
879
+ Available commands in `0.3.28`:
822
880
 
823
881
  | Command | Status |
824
882
  | --- | --- |
@@ -1051,7 +1109,7 @@ devflow approve 001
1051
1109
  ```
1052
1110
 
1053
1111
  Approval is explicit and binds the decision to the current artifact
1054
- digests. For a `0.3.27` change it binds `spec.md`, `discovery.yaml` and,
1112
+ digests. For a `0.3.28` change it binds `spec.md`, `discovery.yaml` and,
1055
1113
  when a manifest applies, the architecture manifest digest. Repeating the
1056
1114
  same approval is a no-op. If an artifact changes after validation,
1057
1115
  DevFlow marks it stale and refuses approval until it is regenerated and
@@ -1062,7 +1120,7 @@ and names the pending questions and assumptions. Approval also rejects a
1062
1120
  specification whose section 7 still lists open questions. Legacy `0.2.0`
1063
1121
  changes without `discovery.yaml` remain approvable with a warning.
1064
1122
 
1065
- Only the `spec` stage is available in `0.3.27`, so `--stage` is optional
1123
+ Only the `spec` stage is available in `0.3.28`, so `--stage` is optional
1066
1124
  and defaults to `spec`. `--stage plan` and `--stage review` are
1067
1125
  rejected. There are no `plan`, `implement` or
1068
1126
  `review` commands in this release.
@@ -1,16 +1,38 @@
1
1
  # DevFlow Toolkit
2
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.27` · Python 3.11+ · Linux and macOS
3
+ Before any code is written, you and the AI agree on what will be built
4
+ and approve it as a spec. The agent then implements once, on something
5
+ clear, instead of trying, failing and redoing. Questions are cheap;
6
+ redoing code is expensive.
7
+
8
+ **The expensive part of an agent is not writing, it is correcting.**
9
+ Give it something ambiguous and it explores the whole repository, writes
10
+ code and tests, you reject it, and it starts again with an ever larger
11
+ context. Every round costs more than the last, and it is paid in output
12
+ tokens, which cost several times more than input tokens.
13
+
14
+ **DevFlow trades code rounds for question rounds.**
15
+
16
+ - **Discovery asks first.** Authentication, permissions, validation,
17
+ what stays out of scope. These rounds are cheap: mostly reading, no
18
+ code.
19
+ - **Validation spends no tokens.** DevFlow checks that Discovery is
20
+ complete and that the spec has the right shape with local Python
21
+ code.
22
+ - **The approved spec guides the agent.** It says which files to touch,
23
+ which requirements to meet (`FR`) and how to prove it is done (`AC`).
24
+ The agent explores less, stays in scope and writes nothing nobody
25
+ asked for.
26
+ - **Each phase reads only what it needs.** Code style rules are loaded
27
+ when implementing, not while specifying.
28
+ - **Context is never lost.** Everything stays in your repository, in a
29
+ few files under `.devflow/`. Switch sessions or agents and there is
30
+ nothing to explain again.
31
+
32
+ The goal is not to generate code faster, but to decide better before
33
+ generating it. Thinking is cheap; redoing code is expensive.
34
+
35
+ Current version: `0.3.28` · Python 3.11+ · Linux and macOS
14
36
 
15
37
  ## Install
16
38
 
@@ -168,7 +190,9 @@ written outside the normal flow.
168
190
  - [Full reference](docs/REFERENCE.md): every command, option, file and
169
191
  rule.
170
192
  - [Changelog](CHANGELOG.md)
171
- - [How to publish a release](PUBLISHING.md)
193
+ - [How to publish a release](docs/PUBLISHING.md)
194
+ - [Team presentation](docs/PRESENTATION.md) and [demo script](docs/DEMO.md)
195
+ (in Spanish)
172
196
 
173
197
  ## Acknowledgments
174
198
 
@@ -0,0 +1,159 @@
1
+ # Guion de la demo de DevFlow
2
+
3
+ Cómo dejar listo un proyecto de ejemplo y cómo presentar la demo en unos
4
+ 10 minutos. El objetivo es no esperar al modelo en directo: lo lento se
5
+ prepara antes y en vivo solo se muestra.
6
+
7
+ Este guion usa el proyecto Django `example` (una biblioteca con autores y
8
+ libros) y Claude Code como agente. Con OpenCode es igual: cambia
9
+ `claude-code` por `opencode`.
10
+
11
+ ---
12
+
13
+ ## Parte 1. Preparación (el día anterior)
14
+
15
+ ### 1. Actualizar DevFlow en el proyecto
16
+
17
+ ```bash
18
+ cd ~/Escritorio/example
19
+ source venv/bin/activate
20
+ pip install -U devflow-toolkit
21
+ devflow version
22
+ devflow harness use claude-code
23
+ ```
24
+
25
+ `harness use` regenera `CLAUDE.md` con las instrucciones de la versión
26
+ instalada.
27
+
28
+ ### 2. Convertir el proyecto en un repositorio git
29
+
30
+ Los controles de seguridad se instalan como hook de git, y al final
31
+ servirá para volver al estado inicial.
32
+
33
+ ```bash
34
+ git init
35
+ ```
36
+
37
+ ### 3. Activar los controles de seguridad (opcional)
38
+
39
+ Solo si vas a mostrarlos:
40
+
41
+ ```bash
42
+ devflow init --security-tools
43
+ pre-commit run --all-files
44
+ ```
45
+
46
+ La primera ejecución descarga las herramientas y tarda varios minutos.
47
+ Hazla ahora, no en la demo. Si gitleaks detecta el `SECRET_KEY` de
48
+ `settings.py`, es un buen ejemplo para mostrar.
49
+
50
+ ### 4. Tener un cambio ya aprobado (001)
51
+
52
+ Comprueba que la spec 001 está aprobada:
53
+
54
+ ```bash
55
+ devflow status 001
56
+ ```
57
+
58
+ Debe mostrar `Status: spec_approved`. Si no existe, créala completa
59
+ antes de la demo (Discovery, spec y aprobación):
60
+
61
+ ```bash
62
+ devflow spec "Quiero crear un sistema de autenticación con registro, login y logout"
63
+ devflow spec --continue 001
64
+ devflow approve 001
65
+ ```
66
+
67
+ Abre en el editor y deja marcadas estas partes de
68
+ `.devflow/specs/001-…/spec.md`:
69
+
70
+ - sección 5: los requisitos `FR-XXX`, que citan las decisiones `Qn`;
71
+ - sección 8: los criterios `AC-XXX`, que citan su `FR`;
72
+ - sección 4: los riesgos de seguridad detectados;
73
+ - sección 10 y 10.1: fuera de alcance y specs sugeridas.
74
+
75
+ ### 5. Tener un cambio a medias (002)
76
+
77
+ Es el que se usa en vivo para enseñar las preguntas.
78
+
79
+ ```bash
80
+ devflow spec "Agregar búsqueda de libros por título y autor"
81
+ ```
82
+
83
+ Responde **una sola ronda** de preguntas y sal con `/exit` sin terminar.
84
+ Así, en la demo, `--continue` mostrará preguntas reales al instante.
85
+
86
+ Comprueba que quedó pendiente:
87
+
88
+ ```bash
89
+ devflow status 002
90
+ ```
91
+
92
+ Debe mostrar preguntas `pending` y `Next: devflow spec --continue 002`.
93
+
94
+ ### 6. Guardar el punto de partida
95
+
96
+ Con 001 aprobada y 002 a medias, guarda este estado. Después de la demo
97
+ se vuelve a él con un comando.
98
+
99
+ ```bash
100
+ git add -A
101
+ git commit -m "Estado inicial de la demo"
102
+ cp db.sqlite3 /tmp/db.sqlite3.demo
103
+ ```
104
+
105
+ `db.sqlite3` está en `.gitignore`, por eso se copia aparte. Si instalaste
106
+ los controles de seguridad, este commit ya los ejecuta.
107
+
108
+ ### 7. Ensayar
109
+
110
+ Haz la demo completa una vez y mide el tiempo. Ten abiertas de antemano:
111
+
112
+ - una terminal en `~/Escritorio/example` con el entorno activado;
113
+ - el editor con `spec.md` de 001 y `discovery.yaml` de 002;
114
+ - la página <https://pypi.org/project/devflow-toolkit/>.
115
+
116
+ ---
117
+
118
+ ## Parte 2. La demo en vivo (unos 10 minutos)
119
+
120
+ | Paso | Qué hacer | Qué decir | Tiempo |
121
+ | --- | --- | --- | --- |
122
+ | 1 | Mostrar `.devflow/constitution/` | "La constitución son nuestras reglas. El agente las lee antes de especificar." | 1 min |
123
+ | 2 | `devflow spec --continue 002` | "La IA pregunta antes de escribir código. Fíjense: opción recomendada, una de siguiente nivel y por qué importa." Responde una o dos preguntas | 3 min |
124
+ | 3 | `/exit` y `devflow status 002` | "DevFlow valida en local, sin gastar tokens, y dice qué sigue." | 1 min |
125
+ | 4 | Abrir `spec.md` de 001 | "Requisitos enlazados con criterios de aceptación, riesgos de seguridad, qué queda fuera y los siguientes niveles sugeridos." | 3 min |
126
+ | 5 | `devflow status 001` | "Está aprobada, ligada a una huella SHA-256. Si alguien la edita, DevFlow lo detecta." | 1 min |
127
+ | 6 | En Claude Code: `Implementa .devflow/specs/001-…/spec.md` (solo mostrar, no esperar) | "El agente implementa solo lo aprobado, con nuestras reglas de código." | 30 s |
128
+ | 7 | Explicar `devflow reopen 001` | "Si hay que cambiar algo aprobado, se reabre de forma controlada." | 30 s |
129
+
130
+ **Consejo:** en el paso 2 no esperes a que Discovery termine. Basta con
131
+ enseñar las preguntas; luego pasa a la spec 001, que ya está lista.
132
+
133
+ ---
134
+
135
+ ## Plan B
136
+
137
+ - **El modelo tarda o no hay internet:** salta el paso 2 y enseña
138
+ `discovery.yaml` de 002 en el editor: las preguntas, opciones y
139
+ explicaciones ya están ahí.
140
+ - **Un comando falla:** `devflow status 00X` siempre indica el siguiente
141
+ paso; `devflow doctor 00X` explica el problema.
142
+
143
+ ---
144
+
145
+ ## Parte 3. Después de la demo
146
+
147
+ Volver al estado inicial:
148
+
149
+ ```bash
150
+ cd ~/Escritorio/example
151
+ git reset --hard
152
+ git clean -fd
153
+ cp /tmp/db.sqlite3.demo db.sqlite3
154
+ ```
155
+
156
+ `git reset --hard` deshace lo que cambió en la demo (por ejemplo, las
157
+ respuestas añadidas a 002) y `git clean -fd` borra los archivos nuevos
158
+ que no estaban en el commit inicial. Revisa antes con `git clean -nd` si
159
+ no estás seguro de qué se borrará.
@@ -0,0 +1,155 @@
1
+ # DevFlow: presentación para el equipo
2
+
3
+ Documento de una página para presentar DevFlow y proponer un piloto.
4
+ El guion de la demo y su preparación están en [DEMO.md](DEMO.md).
5
+
6
+ - Paquete: <https://pypi.org/project/devflow-toolkit/>
7
+ - Instalación: `pip install devflow-toolkit`
8
+
9
+ ---
10
+
11
+ ## El mensaje en 30 segundos
12
+
13
+ > Hoy cada uno trabaja con la IA a su manera. Le pedimos algo ambiguo,
14
+ > itera corrigiendo y a veces deja código o alcance que nadie pidió: es
15
+ > deuda técnica que creamos sin darnos cuenta. DevFlow pone un paso común
16
+ > antes de programar: **la IA pregunta, nosotros decidimos, queda una
17
+ > spec aprobada y el agente implementa solo eso.**
18
+
19
+ La idea no es generar código más rápido, sino decidir mejor antes de
20
+ generarlo. Pensar es barato; rehacer código es caro.
21
+
22
+ ---
23
+
24
+ ## El problema
25
+
26
+ **Lo caro de un agente no es escribir, es corregir.** Cuando le pedimos
27
+ algo ambiguo, explora todo el repositorio, escribe código y tests,
28
+ nosotros lo rechazamos y vuelve a empezar con un contexto cada vez más
29
+ grande. Cada vuelta sale más cara que la anterior, y además se paga en
30
+ tokens de salida, que cuestan varias veces más que los de entrada.
31
+
32
+ En una empresa esto se nota en:
33
+
34
+ - rondas de corrección que alargan cada tarea;
35
+ - código o alcance que nadie pidió y que luego hay que mantener;
36
+ - cada desarrollador usa la IA de forma distinta;
37
+ - no queda registro de por qué se decidió algo;
38
+ - la seguridad se recuerda tarde, en la revisión o en producción;
39
+ - el contexto se pierde al cambiar de sesión, de agente o de persona.
40
+
41
+ ---
42
+
43
+ ## Cómo lo resuelve DevFlow
44
+
45
+ **Cambia vueltas de código por vueltas de preguntas.**
46
+
47
+ | Lo que pasa hoy | Cómo lo resuelve DevFlow |
48
+ | --- | --- |
49
+ | El agente itera corrigiendo y cada vuelta cuesta más | Las decisiones se toman **antes**, en rondas de preguntas baratas (sobre todo lectura, sin código) |
50
+ | Código y alcance que nadie pidió | La spec fija requisitos (`FR`), criterios de aceptación (`AC`) y qué queda **fuera de alcance** |
51
+ | Cada uno usa la IA a su manera | Mismo flujo y misma **constitución** (reglas de arquitectura y de código) en cada proyecto |
52
+ | No se sabe por qué se decidió algo | `discovery.yaml` guarda cada pregunta, la respuesta y quién la dio; la aprobación queda ligada a una huella SHA-256 |
53
+ | La seguridad llega tarde | Discovery pregunta la seguridad básica de forma explícita, con su explicación; hay controles locales opcionales en cada commit |
54
+ | Se pierde el contexto | Todo queda en el repositorio, en pocos archivos dentro de `.devflow/` |
55
+
56
+ Además:
57
+
58
+ - **La validación no gasta tokens.** DevFlow comprueba en Python, en
59
+ local, que Discovery está completo y que la spec tiene la forma
60
+ correcta.
61
+ - **Cada fase lee solo lo que necesita.** Las reglas de estilo de código
62
+ solo se cargan al implementar, no mientras se especifica.
63
+ - **Se crece por niveles.** Cada pregunta puede ofrecer un "siguiente
64
+ nivel". Lo que no se elige ahora queda como spec sugerida, con su
65
+ explicación, para una próxima iteración.
66
+
67
+ ---
68
+
69
+ ## El flujo
70
+
71
+ ```text
72
+ devflow init una vez por proyecto
73
+ devflow spec "el cambio" Discovery: la IA pregunta, tú respondes
74
+ devflow spec --continue 001 hasta que la spec queda escrita
75
+ devflow approve 001 apruebas la spec
76
+ "Implementa .devflow/specs/001-…/spec.md" el agente la construye
77
+
78
+ ¿Hay que cambiar una spec aprobada? devflow reopen 001
79
+ ¿Qué sigue? devflow status 001
80
+ ```
81
+
82
+ Funciona con OpenCode y Claude Code (verificados) y con Codex, Kiro y
83
+ Antigravity (sin verificar todavía). La spec es Markdown portable: no
84
+ depende del agente.
85
+
86
+ ---
87
+
88
+ ## Propuesta: un piloto, no una imposición
89
+
90
+ | | |
91
+ | --- | --- |
92
+ | **Duración** | 3 o 4 semanas |
93
+ | **Equipos** | 1 o 2 |
94
+ | **Qué cambios** | Solo medianos: funcionalidades nuevas, integraciones, refactors. Los cambios triviales siguen como hoy |
95
+ | **Qué medir (antes y después)** | Rondas de corrección por tarea; comentarios de revisión por PR; PRs reabiertos o corregidos; tiempo hasta el merge; coste en tokens, si está disponible |
96
+ | **Criterio de éxito** | Menos correcciones y retrabajo sin alargar demasiado el tiempo total |
97
+
98
+ Al final del piloto: revisar los números, recoger opiniones y decidir si
99
+ se amplía.
100
+
101
+ ---
102
+
103
+ ## Limitaciones (para ser transparentes)
104
+
105
+ - **Versión alfa (0.3.x).** Funciona, pero sigue evolucionando.
106
+ - **Solo cubre la especificación.** La implementación la hace el agente
107
+ siguiendo `AGENTS.md`; DevFlow todavía no verifica el resultado.
108
+ - **Agentes verificados:** OpenCode y Claude Code. El resto, sin
109
+ verificar.
110
+ - **Solo Linux y macOS.** Windows no está soportado.
111
+ - **La calidad de Discovery depende del modelo.** Con modelos pequeños
112
+ las preguntas son peores.
113
+ - **Tiene un coste fijo.** No compensa en cambios triviales.
114
+
115
+ ---
116
+
117
+ ## Preguntas que probablemente surgirán
118
+
119
+ **¿No es más lento?**
120
+ Añade entre 5 y 15 minutos de preguntas al empezar un cambio, pero evita
121
+ rondas de corrección que cuestan más tiempo y más tokens.
122
+
123
+ **¿Nos obliga a usar un agente concreto?**
124
+ No. Funciona con varios y la spec es un archivo Markdown portable.
125
+
126
+ **¿Y si la IA pregunta demasiado?**
127
+ Discovery trabaja por niveles: esta spec cubre lo esencial y lo avanzado
128
+ pasa a specs sugeridas.
129
+
130
+ **¿Dónde quedan los datos?**
131
+ En el propio repositorio. No hay servicio externo ni telemetría.
132
+
133
+ **¿Qué pasa si hay que cambiar algo ya aprobado?**
134
+ `devflow reopen 001` retira la aprobación, guarda la versión anterior en
135
+ `history/` y permite corregir o volver a Discovery.
136
+
137
+ **¿Y la seguridad?**
138
+ Discovery pregunta la seguridad básica de forma explícita y nunca la
139
+ asume. Tras la primera aprobación, DevFlow ofrece herramientas locales
140
+ (Semgrep, Bandit, pip-audit, gitleaks) que revisan el código en cada
141
+ commit, sin tokens.
142
+
143
+ ---
144
+
145
+ ## Próximos pasos posibles
146
+
147
+ 1. **Perfil de empresa:** una constitución propia (arquitectura,
148
+ estándares, seguridad) compartida por todos los proyectos. Es la pieza
149
+ que convierte DevFlow en un estándar común.
150
+ 2. **Seguridad por niveles (OWASP ASVS):** nivel 1 en cada spec y el
151
+ nivel 2 como siguiente paso, con una sección de consideraciones de
152
+ seguridad y riesgos aceptados con responsable.
153
+ 3. **Verificación (`devflow verify`):** comprobar cada criterio de
154
+ aceptación con evidencia (tests y herramientas) después de
155
+ implementar.