devflow-toolkit 0.3.26__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.
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/CHANGELOG.md +51 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/PKG-INFO +89 -13
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/README.md +36 -12
- devflow_toolkit-0.3.28/docs/DEMO.md +159 -0
- devflow_toolkit-0.3.28/docs/PRESENTATION.md +155 -0
- devflow_toolkit-0.3.28/docs/PUBLISHING.md +266 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/docs/REFERENCE.md +88 -12
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/pyproject.toml +1 -2
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/claude_code.py +34 -4
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/status.py +3 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/discovery.py +74 -13
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/spec_workflow.py +1 -0
- devflow_toolkit-0.3.28/src/devflow/hooks/__init__.py +1 -0
- devflow_toolkit-0.3.28/src/devflow/hooks/claude_guard.py +76 -0
- devflow_toolkit-0.3.28/src/devflow/prompts/discovery-repair.md +37 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/prompts/discovery.md +4 -3
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_discovery_decisions.py +96 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_harness_adapters.py +42 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_spec_workflow.py +4 -4
- devflow_toolkit-0.3.26/PUBLISHING.md +0 -155
- devflow_toolkit-0.3.26/src/devflow/prompts/discovery-repair.md +0 -36
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/.gitignore +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/LICENSE +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/agents.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/antigravity.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/base.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/codex.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/detector.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/instructions.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/kiro.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/opencode.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/adapters/registry.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/cli.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/approve.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/config.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/doctor.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/harness.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/init.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/recover.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/reopen.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/security.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/commands/spec.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/architecture.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/errors.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/models.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/artifacts/store.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/clock.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/config.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/constitution.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/file_types.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/ports.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/profile_manager.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/project.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/recovery.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/security_tools.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/specification.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/errors.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/events.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/locator.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/lock.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/manager.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/models.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/core/state/transitions.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/models/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/models/profile.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/models/project.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/constitution/architecture.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/constitution/constitution.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/base/profile.yaml +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/django-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/prompts/__init__.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/src/devflow/prompts/spec.md +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_cli.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_discovery.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_event_log.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_greenfield.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_hardening.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_recovery.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_security_tools.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_state.py +0 -0
- {devflow_toolkit-0.3.26 → devflow_toolkit-0.3.28}/tests/test_state_replay.py +0 -0
|
@@ -2,6 +2,57 @@
|
|
|
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
|
+
|
|
28
|
+
## 0.3.27 - 2026-11-09
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Claude Code sessions with spec-only permissions get a `PreToolUse`
|
|
33
|
+
hook (`devflow.hooks.claude_guard`) that blocks writes outside
|
|
34
|
+
`.devflow/specs/` without asking the user, and tells the agent why.
|
|
35
|
+
Manual mode stays, so the Discovery question dialog keeps working.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Minor mistakes in `discovery.yaml` are corrected instead of starting a
|
|
40
|
+
repair session, and reported as warnings and in `devflow status`:
|
|
41
|
+
unknown categories map to the closest valid one, unknown
|
|
42
|
+
materialities fall back to the category default, and missing
|
|
43
|
+
`answered_by`/`answered_at` on user answers are filled in. Critical
|
|
44
|
+
decisions still cannot be assumed.
|
|
45
|
+
- Discovery and repair prompts tell the agent not to create scripts or
|
|
46
|
+
run commands to validate the record: DevFlow validates it when the
|
|
47
|
+
session ends.
|
|
48
|
+
- The repair prompt states the language first, describes any rejected
|
|
49
|
+
field (not only YAML syntax) and asks the agent to tell the user to
|
|
50
|
+
exit when done.
|
|
51
|
+
|
|
52
|
+
### Package
|
|
53
|
+
|
|
54
|
+
- Package version is `0.3.27`.
|
|
55
|
+
|
|
5
56
|
## 0.3.26 - 2026-11-09
|
|
6
57
|
|
|
7
58
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: devflow-toolkit
|
|
3
|
-
Version: 0.3.
|
|
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.
|
|
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.
|
|
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.
|
|
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 |
|
|
@@ -551,6 +609,13 @@ pre-approved, while shell, web and task tools remain denied.
|
|
|
551
609
|
Non-interactive runs keep the locked `dontAsk` mode and do not allow the
|
|
552
610
|
question tool.
|
|
553
611
|
|
|
612
|
+
Manual mode would ask you about any other write, such as a helper
|
|
613
|
+
script in `/tmp`. To avoid that prompt, DevFlow also passes a
|
|
614
|
+
`PreToolUse` hook (`devflow.hooks.claude_guard`) that blocks every
|
|
615
|
+
`Write`, `Edit`, `MultiEdit` and `NotebookEdit` outside
|
|
616
|
+
`.devflow/specs/` without asking, and tells the agent why. The hook is
|
|
617
|
+
not added when `allow_source_code_changes` is enabled.
|
|
618
|
+
|
|
554
619
|
## Discovery
|
|
555
620
|
|
|
556
621
|
Discovery is separate from specification. The project context decides
|
|
@@ -731,6 +796,17 @@ specification and asks you to run `devflow spec --continue`, which
|
|
|
731
796
|
repairs the file first. When an agent lists questions in section 7,
|
|
732
797
|
nested bullets stay part of the same question.
|
|
733
798
|
|
|
799
|
+
DevFlow corrects minor mistakes instead of starting a repair session,
|
|
800
|
+
and lists each correction as a warning and in `devflow status`: an
|
|
801
|
+
unknown category is read as the closest valid one (for example
|
|
802
|
+
`api_contract` as `functional_scope`, `security` as
|
|
803
|
+
`security_authentication`), an unknown materiality falls back to the
|
|
804
|
+
category default, and a user answer without `answered_by` or
|
|
805
|
+
`answered_at` is read as `user` at the record's `updated_at`. The
|
|
806
|
+
materiality the agent wrote is kept, so a `critical` decision can still
|
|
807
|
+
never be assumed. Unreadable YAML, answers on pending decisions and
|
|
808
|
+
assumed critical decisions still require a repair.
|
|
809
|
+
|
|
734
810
|
DevFlow derives completeness from the decisions themselves: a record
|
|
735
811
|
marked `complete` with pending questions is treated as
|
|
736
812
|
`awaiting_clarification`, and a question written with
|
|
@@ -800,7 +876,7 @@ for each item; the agent does not write it.
|
|
|
800
876
|
8. If artifacts exist without workflow state, diagnose with
|
|
801
877
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
802
878
|
|
|
803
|
-
Available commands in `0.3.
|
|
879
|
+
Available commands in `0.3.28`:
|
|
804
880
|
|
|
805
881
|
| Command | Status |
|
|
806
882
|
| --- | --- |
|
|
@@ -1033,7 +1109,7 @@ devflow approve 001
|
|
|
1033
1109
|
```
|
|
1034
1110
|
|
|
1035
1111
|
Approval is explicit and binds the decision to the current artifact
|
|
1036
|
-
digests. For a `0.3.
|
|
1112
|
+
digests. For a `0.3.28` change it binds `spec.md`, `discovery.yaml` and,
|
|
1037
1113
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
1038
1114
|
same approval is a no-op. If an artifact changes after validation,
|
|
1039
1115
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -1044,7 +1120,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
1044
1120
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
1045
1121
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
1046
1122
|
|
|
1047
|
-
Only the `spec` stage is available in `0.3.
|
|
1123
|
+
Only the `spec` stage is available in `0.3.28`, so `--stage` is optional
|
|
1048
1124
|
and defaults to `spec`. `--stage plan` and `--stage review` are
|
|
1049
1125
|
rejected. There are no `plan`, `implement` or
|
|
1050
1126
|
`review` commands in this release.
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
# DevFlow Toolkit
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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.
|