devflow-toolkit 0.3.24__tar.gz → 0.3.25__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.24 → devflow_toolkit-0.3.25}/CHANGELOG.md +32 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/PKG-INFO +39 -12
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/README.md +17 -3
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/docs/REFERENCE.md +38 -11
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/pyproject.toml +1 -1
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/init.py +68 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/status.py +18 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/discovery.py +16 -2
- devflow_toolkit-0.3.25/src/devflow/core/security_tools.py +301 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/specification.py +79 -5
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/prompts/discovery.md +14 -8
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/prompts/spec.md +12 -6
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_discovery_decisions.py +22 -0
- devflow_toolkit-0.3.25/tests/test_security_tools.py +192 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_spec_workflow.py +26 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_state.py +1 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/.gitignore +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/LICENSE +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/PUBLISHING.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/agents.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/antigravity.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/base.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/claude_code.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/codex.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/detector.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/instructions.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/kiro.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/opencode.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/adapters/registry.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/cli.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/approve.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/config.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/doctor.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/harness.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/recover.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/reopen.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/commands/spec.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/architecture.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/artifacts/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/artifacts/errors.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/artifacts/models.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/artifacts/store.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/clock.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/config.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/constitution.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/file_types.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/ports.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/profile_manager.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/project.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/recovery.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/spec_workflow.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/errors.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/events.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/locator.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/lock.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/manager.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/models.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/core/state/transitions.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/models/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/models/profile.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/models/project.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/ai-rag/profile.yaml +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/base/constitution/architecture.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/base/constitution/code-standards.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/base/constitution/constitution.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/base/profile.yaml +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/django-backend/constitution/django-standards.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/django-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/profiles/fastapi-backend/profile.yaml +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/prompts/__init__.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/src/devflow/prompts/discovery-repair.md +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_cli.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_discovery.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_event_log.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_greenfield.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_hardening.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_harness_adapters.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_recovery.py +0 -0
- {devflow_toolkit-0.3.24 → devflow_toolkit-0.3.25}/tests/test_state_replay.py +0 -0
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to DevFlow Toolkit are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.3.25 - 2026-11-09
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `devflow init` offers local security checks that run on every
|
|
10
|
+
commit, without tokens: Semgrep (Django or Python and OWASP rules),
|
|
11
|
+
Bandit, pip-audit and gitleaks, run by pre-commit. It writes a managed
|
|
12
|
+
`.pre-commit-config.yaml` with pinned revisions, installs `pre-commit`
|
|
13
|
+
when missing and runs `pre-commit install`. `--security-tools` and
|
|
14
|
+
`--no-security-tools` skip the question.
|
|
15
|
+
- `next_level.title` names the suggested specification. Suggestions use
|
|
16
|
+
it instead of the raw option text.
|
|
17
|
+
- `devflow status` shows a short review checklist before approval.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Acceptance criteria are plain list items (`- **AC-001:**`) without
|
|
22
|
+
checkboxes; DevFlow removes checkboxes an agent writes. Criteria are
|
|
23
|
+
verified during implementation, not ticked in an approved file.
|
|
24
|
+
- DevFlow writes section 11 itself: how the approval is recorded and
|
|
25
|
+
how to reopen it, in the documentation language. The agent leaves it
|
|
26
|
+
empty.
|
|
27
|
+
- Discovery adds a `next_level` only for a real improvement, never for
|
|
28
|
+
an alternative or a reduction.
|
|
29
|
+
- The specification prompt asks for a one-paragraph summary, no
|
|
30
|
+
repetition across sections and no repeated deferred items in
|
|
31
|
+
section 10.
|
|
32
|
+
|
|
33
|
+
### Package
|
|
34
|
+
|
|
35
|
+
- Package version is `0.3.25`.
|
|
36
|
+
|
|
5
37
|
## 0.3.24 - 2026-11-09
|
|
6
38
|
|
|
7
39
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: devflow-toolkit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.25
|
|
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.
|
|
35
|
+
**Current version: `0.3.25`.**
|
|
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.
|
|
155
|
+
pip install devflow_toolkit-0.3.25-py3-none-any.whl
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
Verify the installation:
|
|
@@ -315,6 +315,30 @@ error instead of silently switching to deterministic analysis. Pass
|
|
|
315
315
|
`--harness none` or `--no-agent` to opt into deterministic output
|
|
316
316
|
explicitly.
|
|
317
317
|
|
|
318
|
+
### Local security checks
|
|
319
|
+
|
|
320
|
+
`devflow init` offers tools that run locally on every commit, without
|
|
321
|
+
tokens:
|
|
322
|
+
|
|
323
|
+
- Semgrep, with rules for Django (or Python) and OWASP;
|
|
324
|
+
- Bandit, for Python code;
|
|
325
|
+
- pip-audit, for vulnerable dependencies;
|
|
326
|
+
- gitleaks, for secrets in the code.
|
|
327
|
+
|
|
328
|
+
pre-commit (pre-commit.com) runs these tools automatically on every
|
|
329
|
+
commit. In an interactive terminal `init` describes them and asks; use
|
|
330
|
+
`--security-tools` to install them without asking, or
|
|
331
|
+
`--no-security-tools` to skip the offer.
|
|
332
|
+
|
|
333
|
+
Accepting writes a managed `.pre-commit-config.yaml` with pinned hook
|
|
334
|
+
revisions, installs `pre-commit` with pip when it is missing and runs
|
|
335
|
+
`pre-commit install` when the project is a git repository. Only the
|
|
336
|
+
hooks that apply are added: Bandit and pip-audit for Python projects,
|
|
337
|
+
`p/django` rules for Django. An existing, unmanaged
|
|
338
|
+
`.pre-commit-config.yaml` is never overwritten. The first commit
|
|
339
|
+
downloads the tools; `pre-commit run --all-files` checks the whole
|
|
340
|
+
project.
|
|
341
|
+
|
|
318
342
|
## Configuration
|
|
319
343
|
|
|
320
344
|
`.devflow/config.yaml` stores project settings. It references the
|
|
@@ -428,7 +452,7 @@ as an architectural constraint when it is present.
|
|
|
428
452
|
|
|
429
453
|
### Harnesses
|
|
430
454
|
|
|
431
|
-
| Harness | Status in 0.3.
|
|
455
|
+
| Harness | Status in 0.3.25 |
|
|
432
456
|
| --- | --- |
|
|
433
457
|
| OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
|
|
434
458
|
| Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
|
|
@@ -717,8 +741,10 @@ everything at once:
|
|
|
717
741
|
2. **Security is always asked, never assumed.** Basic security decisions
|
|
718
742
|
are explicit questions with a recommended option and a short
|
|
719
743
|
explanation, so the user learns them by answering.
|
|
720
|
-
3. **
|
|
721
|
-
one level further
|
|
744
|
+
3. **Questions offer a next level when a real improvement exists.** One
|
|
745
|
+
option takes the decision one level further (more secure, capable or
|
|
746
|
+
robust; never a mere alternative or a reduction). It is recorded in
|
|
747
|
+
`next_level`, with a `title` phrased as a future spec request:
|
|
722
748
|
|
|
723
749
|
```yaml
|
|
724
750
|
options:
|
|
@@ -726,13 +752,14 @@ everything at once:
|
|
|
726
752
|
- "Token that expires after 24 hours"
|
|
727
753
|
next_level:
|
|
728
754
|
option: "Token that expires after 24 hours"
|
|
755
|
+
title: "Expire login tokens after 24 hours"
|
|
729
756
|
why: "Limits the damage if a token leaks."
|
|
730
757
|
```
|
|
731
758
|
|
|
732
759
|
If the user chooses it, the answer uses that exact text. If not,
|
|
733
|
-
DevFlow
|
|
734
|
-
recommended option is level 1, so a
|
|
735
|
-
recommended is ignored.
|
|
760
|
+
DevFlow suggests `title` (or the option text when there is no title)
|
|
761
|
+
as a later specification. The recommended option is level 1, so a
|
|
762
|
+
`next_level` marked as recommended is ignored.
|
|
736
763
|
4. **No deeper than this level.** More advanced decisions found along
|
|
737
764
|
the way, and parts of a large request left for later, are recorded in
|
|
738
765
|
`deferred`:
|
|
@@ -768,7 +795,7 @@ for each item; the agent does not write it.
|
|
|
768
795
|
8. If artifacts exist without workflow state, diagnose with
|
|
769
796
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
770
797
|
|
|
771
|
-
Available commands in `0.3.
|
|
798
|
+
Available commands in `0.3.25`:
|
|
772
799
|
|
|
773
800
|
| Command | Status |
|
|
774
801
|
| --- | --- |
|
|
@@ -1001,7 +1028,7 @@ devflow approve 001
|
|
|
1001
1028
|
```
|
|
1002
1029
|
|
|
1003
1030
|
Approval is explicit and binds the decision to the current artifact
|
|
1004
|
-
digests. For a `0.3.
|
|
1031
|
+
digests. For a `0.3.25` change it binds `spec.md`, `discovery.yaml` and,
|
|
1005
1032
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
1006
1033
|
same approval is a no-op. If an artifact changes after validation,
|
|
1007
1034
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -1012,7 +1039,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
1012
1039
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
1013
1040
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
1014
1041
|
|
|
1015
|
-
Only the `spec` stage is available in `0.3.
|
|
1042
|
+
Only the `spec` stage is available in `0.3.25`, so `--stage` is optional
|
|
1016
1043
|
and defaults to `spec`. `--stage plan` and `--stage review` are
|
|
1017
1044
|
rejected. There are no `plan`, `implement` or
|
|
1018
1045
|
`review` commands in this release.
|
|
@@ -10,7 +10,7 @@ approved specification instead of a vague chat request.
|
|
|
10
10
|
approval live in `.devflow/`, so any agent or teammate can pick up
|
|
11
11
|
the work.
|
|
12
12
|
|
|
13
|
-
Current version: `0.3.
|
|
13
|
+
Current version: `0.3.25` · Python 3.11+ · Linux and macOS
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
@@ -52,6 +52,17 @@ devflow init --harness opencode --language es
|
|
|
52
52
|
`codex`, `antigravity`, `kiro`). `--language` is the language of the
|
|
53
53
|
questions and the spec.
|
|
54
54
|
|
|
55
|
+
`init` also offers tools that run locally on every commit, without
|
|
56
|
+
tokens:
|
|
57
|
+
|
|
58
|
+
- Semgrep, with rules for Django and OWASP;
|
|
59
|
+
- Bandit, for Python code;
|
|
60
|
+
- pip-audit, for vulnerable dependencies;
|
|
61
|
+
- gitleaks, for secrets in the code.
|
|
62
|
+
|
|
63
|
+
pre-commit (pre-commit.com) runs them automatically on every commit.
|
|
64
|
+
Accept the offer, or add them later with `devflow init --security-tools`.
|
|
65
|
+
|
|
55
66
|
### 2. Describe the change
|
|
56
67
|
|
|
57
68
|
```bash
|
|
@@ -86,8 +97,11 @@ Prefer one command for both phases? Add `--auto` to the first command:
|
|
|
86
97
|
|
|
87
98
|
### 4. Review and approve
|
|
88
99
|
|
|
89
|
-
Read `.devflow/specs/001-…/spec.md`.
|
|
90
|
-
|
|
100
|
+
Read `.devflow/specs/001-…/spec.md`. `devflow status 001` shows a short
|
|
101
|
+
review checklist. You don't tick anything in the file: acceptance
|
|
102
|
+
criteria are verified during implementation, and editing an approved
|
|
103
|
+
spec invalidates the approval. Section 10.1 lists the suggested next
|
|
104
|
+
specs, each with its `devflow spec "..."` command. Then:
|
|
91
105
|
|
|
92
106
|
```bash
|
|
93
107
|
devflow approve 001
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DevFlow Toolkit
|
|
2
2
|
|
|
3
|
-
**Current version: `0.3.
|
|
3
|
+
**Current version: `0.3.25`.**
|
|
4
4
|
|
|
5
5
|
DevFlow is a command-line toolkit for leading AI models and coding
|
|
6
6
|
agents through specification-driven changes in real software projects.
|
|
@@ -120,7 +120,7 @@ pip install devflow-toolkit
|
|
|
120
120
|
To install a specific built artifact instead:
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
pip install devflow_toolkit-0.3.
|
|
123
|
+
pip install devflow_toolkit-0.3.25-py3-none-any.whl
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Verify the installation:
|
|
@@ -283,6 +283,30 @@ error instead of silently switching to deterministic analysis. Pass
|
|
|
283
283
|
`--harness none` or `--no-agent` to opt into deterministic output
|
|
284
284
|
explicitly.
|
|
285
285
|
|
|
286
|
+
### Local security checks
|
|
287
|
+
|
|
288
|
+
`devflow init` offers tools that run locally on every commit, without
|
|
289
|
+
tokens:
|
|
290
|
+
|
|
291
|
+
- Semgrep, with rules for Django (or Python) and OWASP;
|
|
292
|
+
- Bandit, for Python code;
|
|
293
|
+
- pip-audit, for vulnerable dependencies;
|
|
294
|
+
- gitleaks, for secrets in the code.
|
|
295
|
+
|
|
296
|
+
pre-commit (pre-commit.com) runs these tools automatically on every
|
|
297
|
+
commit. In an interactive terminal `init` describes them and asks; use
|
|
298
|
+
`--security-tools` to install them without asking, or
|
|
299
|
+
`--no-security-tools` to skip the offer.
|
|
300
|
+
|
|
301
|
+
Accepting writes a managed `.pre-commit-config.yaml` with pinned hook
|
|
302
|
+
revisions, installs `pre-commit` with pip when it is missing and runs
|
|
303
|
+
`pre-commit install` when the project is a git repository. Only the
|
|
304
|
+
hooks that apply are added: Bandit and pip-audit for Python projects,
|
|
305
|
+
`p/django` rules for Django. An existing, unmanaged
|
|
306
|
+
`.pre-commit-config.yaml` is never overwritten. The first commit
|
|
307
|
+
downloads the tools; `pre-commit run --all-files` checks the whole
|
|
308
|
+
project.
|
|
309
|
+
|
|
286
310
|
## Configuration
|
|
287
311
|
|
|
288
312
|
`.devflow/config.yaml` stores project settings. It references the
|
|
@@ -396,7 +420,7 @@ as an architectural constraint when it is present.
|
|
|
396
420
|
|
|
397
421
|
### Harnesses
|
|
398
422
|
|
|
399
|
-
| Harness | Status in 0.3.
|
|
423
|
+
| Harness | Status in 0.3.25 |
|
|
400
424
|
| --- | --- |
|
|
401
425
|
| OpenCode | Verified end-to-end; interactive Discovery uses the `question` tool |
|
|
402
426
|
| Antigravity | Custom agents and scoped permissions generated; `agy` loading and print mode verified |
|
|
@@ -685,8 +709,10 @@ everything at once:
|
|
|
685
709
|
2. **Security is always asked, never assumed.** Basic security decisions
|
|
686
710
|
are explicit questions with a recommended option and a short
|
|
687
711
|
explanation, so the user learns them by answering.
|
|
688
|
-
3. **
|
|
689
|
-
one level further
|
|
712
|
+
3. **Questions offer a next level when a real improvement exists.** One
|
|
713
|
+
option takes the decision one level further (more secure, capable or
|
|
714
|
+
robust; never a mere alternative or a reduction). It is recorded in
|
|
715
|
+
`next_level`, with a `title` phrased as a future spec request:
|
|
690
716
|
|
|
691
717
|
```yaml
|
|
692
718
|
options:
|
|
@@ -694,13 +720,14 @@ everything at once:
|
|
|
694
720
|
- "Token that expires after 24 hours"
|
|
695
721
|
next_level:
|
|
696
722
|
option: "Token that expires after 24 hours"
|
|
723
|
+
title: "Expire login tokens after 24 hours"
|
|
697
724
|
why: "Limits the damage if a token leaks."
|
|
698
725
|
```
|
|
699
726
|
|
|
700
727
|
If the user chooses it, the answer uses that exact text. If not,
|
|
701
|
-
DevFlow
|
|
702
|
-
recommended option is level 1, so a
|
|
703
|
-
recommended is ignored.
|
|
728
|
+
DevFlow suggests `title` (or the option text when there is no title)
|
|
729
|
+
as a later specification. The recommended option is level 1, so a
|
|
730
|
+
`next_level` marked as recommended is ignored.
|
|
704
731
|
4. **No deeper than this level.** More advanced decisions found along
|
|
705
732
|
the way, and parts of a large request left for later, are recorded in
|
|
706
733
|
`deferred`:
|
|
@@ -736,7 +763,7 @@ for each item; the agent does not write it.
|
|
|
736
763
|
8. If artifacts exist without workflow state, diagnose with
|
|
737
764
|
`devflow doctor <id>` and repair with `devflow recover <id>`.
|
|
738
765
|
|
|
739
|
-
Available commands in `0.3.
|
|
766
|
+
Available commands in `0.3.25`:
|
|
740
767
|
|
|
741
768
|
| Command | Status |
|
|
742
769
|
| --- | --- |
|
|
@@ -969,7 +996,7 @@ devflow approve 001
|
|
|
969
996
|
```
|
|
970
997
|
|
|
971
998
|
Approval is explicit and binds the decision to the current artifact
|
|
972
|
-
digests. For a `0.3.
|
|
999
|
+
digests. For a `0.3.25` change it binds `spec.md`, `discovery.yaml` and,
|
|
973
1000
|
when a manifest applies, the architecture manifest digest. Repeating the
|
|
974
1001
|
same approval is a no-op. If an artifact changes after validation,
|
|
975
1002
|
DevFlow marks it stale and refuses approval until it is regenerated and
|
|
@@ -980,7 +1007,7 @@ and names the pending questions and assumptions. Approval also rejects a
|
|
|
980
1007
|
specification whose section 7 still lists open questions. Legacy `0.2.0`
|
|
981
1008
|
changes without `discovery.yaml` remain approvable with a warning.
|
|
982
1009
|
|
|
983
|
-
Only the `spec` stage is available in `0.3.
|
|
1010
|
+
Only the `spec` stage is available in `0.3.25`, so `--stage` is optional
|
|
984
1011
|
and defaults to `spec`. `--stage plan` and `--stage review` are
|
|
985
1012
|
rejected. There are no `plan`, `implement` or
|
|
986
1013
|
`review` commands in this release.
|
|
@@ -37,6 +37,7 @@ from devflow.core.ports import (
|
|
|
37
37
|
SetupResult,
|
|
38
38
|
build_setup_context,
|
|
39
39
|
)
|
|
40
|
+
from devflow.core import security_tools
|
|
40
41
|
from devflow.core.profile_manager import ProfileError, ProfileManager
|
|
41
42
|
from devflow.core.project import ProjectDetector
|
|
42
43
|
from devflow.models.profile import Profile
|
|
@@ -113,6 +114,14 @@ def init(
|
|
|
113
114
|
"during an interactive init."
|
|
114
115
|
),
|
|
115
116
|
),
|
|
117
|
+
security_tools: Optional[bool] = typer.Option(
|
|
118
|
+
None,
|
|
119
|
+
"--security-tools/--no-security-tools",
|
|
120
|
+
help=(
|
|
121
|
+
"Install local security checks (Semgrep, Bandit, pip-audit, "
|
|
122
|
+
"gitleaks) with pre-commit. When omitted, an interactive init asks."
|
|
123
|
+
),
|
|
124
|
+
),
|
|
116
125
|
) -> None:
|
|
117
126
|
"""Initialize DevFlow in a project."""
|
|
118
127
|
try:
|
|
@@ -127,6 +136,7 @@ def init(
|
|
|
127
136
|
project_mode,
|
|
128
137
|
language,
|
|
129
138
|
model,
|
|
139
|
+
security_tools,
|
|
130
140
|
)
|
|
131
141
|
except (
|
|
132
142
|
ArchitectureError,
|
|
@@ -151,6 +161,7 @@ def _initialize(
|
|
|
151
161
|
project_mode: Optional[str],
|
|
152
162
|
language: Optional[str],
|
|
153
163
|
model: Optional[str],
|
|
164
|
+
security_tools: Optional[bool] = None,
|
|
154
165
|
) -> None:
|
|
155
166
|
requested_harness = _requested_harness(harness, no_agent)
|
|
156
167
|
requested_model = (model or "").strip()
|
|
@@ -216,6 +227,12 @@ def _initialize(
|
|
|
216
227
|
model_override=model is not None,
|
|
217
228
|
allow_prompt=not yes and sys.stdin.isatty(),
|
|
218
229
|
)
|
|
230
|
+
_offer_security_tools(
|
|
231
|
+
config=config_manager.load(),
|
|
232
|
+
project=project,
|
|
233
|
+
requested=security_tools,
|
|
234
|
+
allow_prompt=not yes and sys.stdin.isatty(),
|
|
235
|
+
)
|
|
219
236
|
return
|
|
220
237
|
|
|
221
238
|
selected = list(explicit_profiles) or detected_names
|
|
@@ -323,11 +340,62 @@ def _initialize(
|
|
|
323
340
|
f"[green]Specifications directory:[/green] "
|
|
324
341
|
f"{config.specifications_path.relative_to(root)}"
|
|
325
342
|
)
|
|
343
|
+
_offer_security_tools(
|
|
344
|
+
config=config,
|
|
345
|
+
project=project,
|
|
346
|
+
requested=security_tools,
|
|
347
|
+
allow_prompt=not yes and sys.stdin.isatty(),
|
|
348
|
+
)
|
|
326
349
|
console.print(
|
|
327
350
|
"\nNext: [bold]devflow spec \"Describe the change\"[/bold]"
|
|
328
351
|
)
|
|
329
352
|
|
|
330
353
|
|
|
354
|
+
def _offer_security_tools(
|
|
355
|
+
*,
|
|
356
|
+
config: DevFlowConfig,
|
|
357
|
+
project: Project,
|
|
358
|
+
requested: Optional[bool],
|
|
359
|
+
allow_prompt: bool,
|
|
360
|
+
) -> None:
|
|
361
|
+
"""Offer the local security checks and install them on request."""
|
|
362
|
+
if requested is False:
|
|
363
|
+
return
|
|
364
|
+
root = config.root
|
|
365
|
+
plan = security_tools.plan_for(project, root)
|
|
366
|
+
if requested is None:
|
|
367
|
+
if security_tools.is_configured(root):
|
|
368
|
+
return
|
|
369
|
+
if not allow_prompt:
|
|
370
|
+
console.print(
|
|
371
|
+
"[dim]Tip: add local security checks with "
|
|
372
|
+
"'devflow init --security-tools'.[/dim]"
|
|
373
|
+
)
|
|
374
|
+
return
|
|
375
|
+
console.print()
|
|
376
|
+
for line in security_tools.describe(
|
|
377
|
+
plan,
|
|
378
|
+
config.documentation_language,
|
|
379
|
+
):
|
|
380
|
+
console.print(line)
|
|
381
|
+
if not typer.confirm(
|
|
382
|
+
security_tools.confirm_prompt(config.documentation_language),
|
|
383
|
+
default=True,
|
|
384
|
+
):
|
|
385
|
+
return
|
|
386
|
+
|
|
387
|
+
result = security_tools.install(root, plan)
|
|
388
|
+
if result.config_status in {"created", "updated"}:
|
|
389
|
+
console.print(
|
|
390
|
+
f"[green]Security checks configured:[/green] "
|
|
391
|
+
f"{security_tools.PRECOMMIT_CONFIG} ({', '.join(plan.tools)})"
|
|
392
|
+
)
|
|
393
|
+
for message in result.messages:
|
|
394
|
+
console.print(f"[green]{message}[/green]")
|
|
395
|
+
for warning in result.warnings:
|
|
396
|
+
console.print(f"[yellow]Warning:[/yellow] {warning}")
|
|
397
|
+
|
|
398
|
+
|
|
331
399
|
def _prompt_for_language() -> str:
|
|
332
400
|
"""Ask for the documentation language during interactive initialization."""
|
|
333
401
|
console.print(
|
|
@@ -33,6 +33,14 @@ from devflow.core.state import (
|
|
|
33
33
|
console = Console()
|
|
34
34
|
error_console = Console(stderr=True)
|
|
35
35
|
|
|
36
|
+
_REVIEW_CHECKLIST = (
|
|
37
|
+
"The scope matches the request and the Discovery decisions.",
|
|
38
|
+
"Every FR-XXX has at least one AC-XXX that verifies it.",
|
|
39
|
+
"Every AC-XXX can be checked by a test or an inspection.",
|
|
40
|
+
"Security risks in section 4 are mitigated or explicitly accepted.",
|
|
41
|
+
"Section 10 excludes what you do not want built now.",
|
|
42
|
+
)
|
|
43
|
+
|
|
36
44
|
|
|
37
45
|
def status(
|
|
38
46
|
spec_id: str = typer.Argument(
|
|
@@ -127,6 +135,16 @@ def _status(spec_id: str, path: Path) -> None:
|
|
|
127
135
|
"They are not approved and do not advance the change.[/dim]"
|
|
128
136
|
)
|
|
129
137
|
|
|
138
|
+
spec_record = state.artifacts.get("spec")
|
|
139
|
+
if (
|
|
140
|
+
state.status == WorkflowStatus.DRAFT.value
|
|
141
|
+
and spec_record is not None
|
|
142
|
+
and spec_record.status == ArtifactStatus.VALIDATED.value
|
|
143
|
+
):
|
|
144
|
+
console.print("\n[bold]Review before approving[/bold]")
|
|
145
|
+
for item in _REVIEW_CHECKLIST:
|
|
146
|
+
console.print(f" - {item}")
|
|
147
|
+
|
|
130
148
|
next_step = _next_step(current, location, discovery)
|
|
131
149
|
if next_step:
|
|
132
150
|
console.print(f"\n[bold]Next:[/bold] {next_step}")
|
|
@@ -490,9 +490,19 @@ class NextLevel:
|
|
|
490
490
|
|
|
491
491
|
option: str
|
|
492
492
|
why: str
|
|
493
|
+
title: str = ""
|
|
494
|
+
|
|
495
|
+
@property
|
|
496
|
+
def spec_title(self) -> str:
|
|
497
|
+
"""Return the request to use for a later specification."""
|
|
498
|
+
return self.title or self.option
|
|
493
499
|
|
|
494
500
|
def to_dict(self) -> dict[str, Any]:
|
|
495
|
-
|
|
501
|
+
data: dict[str, Any] = {"option": self.option}
|
|
502
|
+
if self.title:
|
|
503
|
+
data["title"] = self.title
|
|
504
|
+
data["why"] = self.why
|
|
505
|
+
return data
|
|
496
506
|
|
|
497
507
|
|
|
498
508
|
@dataclass(frozen=True)
|
|
@@ -701,7 +711,7 @@ class DiscoveryDocument:
|
|
|
701
711
|
continue
|
|
702
712
|
add(
|
|
703
713
|
DeferredItem(
|
|
704
|
-
title=question.next_level.
|
|
714
|
+
title=question.next_level.spec_title,
|
|
705
715
|
why=question.next_level.why,
|
|
706
716
|
question_id=question.id,
|
|
707
717
|
)
|
|
@@ -1310,6 +1320,10 @@ class DiscoveryManager:
|
|
|
1310
1320
|
next_level_mapping.get("why"),
|
|
1311
1321
|
f"{identifier}.next_level.why",
|
|
1312
1322
|
),
|
|
1323
|
+
title=_optional_text(
|
|
1324
|
+
next_level_mapping.get("title"),
|
|
1325
|
+
f"{identifier}.next_level.title",
|
|
1326
|
+
) or "",
|
|
1313
1327
|
)
|
|
1314
1328
|
# The recommended option is level 1, never the next level.
|
|
1315
1329
|
if _RECOMMENDED.search(next_level.option):
|