devflow-toolkit 0.3.0__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 (73) hide show
  1. devflow_toolkit-0.3.0/.gitignore +9 -0
  2. devflow_toolkit-0.3.0/CHANGELOG.md +146 -0
  3. devflow_toolkit-0.3.0/LICENSE +21 -0
  4. devflow_toolkit-0.3.0/PKG-INFO +628 -0
  5. devflow_toolkit-0.3.0/README.md +596 -0
  6. devflow_toolkit-0.3.0/pyproject.toml +85 -0
  7. devflow_toolkit-0.3.0/src/devflow/__init__.py +0 -0
  8. devflow_toolkit-0.3.0/src/devflow/adapters/__init__.py +47 -0
  9. devflow_toolkit-0.3.0/src/devflow/adapters/agents.py +49 -0
  10. devflow_toolkit-0.3.0/src/devflow/adapters/base.py +81 -0
  11. devflow_toolkit-0.3.0/src/devflow/adapters/claude_code.py +120 -0
  12. devflow_toolkit-0.3.0/src/devflow/adapters/codex.py +111 -0
  13. devflow_toolkit-0.3.0/src/devflow/adapters/detector.py +118 -0
  14. devflow_toolkit-0.3.0/src/devflow/adapters/instructions.py +263 -0
  15. devflow_toolkit-0.3.0/src/devflow/adapters/kiro.py +211 -0
  16. devflow_toolkit-0.3.0/src/devflow/adapters/opencode.py +237 -0
  17. devflow_toolkit-0.3.0/src/devflow/adapters/registry.py +41 -0
  18. devflow_toolkit-0.3.0/src/devflow/cli.py +39 -0
  19. devflow_toolkit-0.3.0/src/devflow/commands/__init__.py +6 -0
  20. devflow_toolkit-0.3.0/src/devflow/commands/approve.py +98 -0
  21. devflow_toolkit-0.3.0/src/devflow/commands/harness.py +98 -0
  22. devflow_toolkit-0.3.0/src/devflow/commands/init.py +544 -0
  23. devflow_toolkit-0.3.0/src/devflow/commands/spec.py +514 -0
  24. devflow_toolkit-0.3.0/src/devflow/commands/status.py +156 -0
  25. devflow_toolkit-0.3.0/src/devflow/core/__init__.py +15 -0
  26. devflow_toolkit-0.3.0/src/devflow/core/architecture.py +469 -0
  27. devflow_toolkit-0.3.0/src/devflow/core/artifacts/__init__.py +29 -0
  28. devflow_toolkit-0.3.0/src/devflow/core/artifacts/errors.py +19 -0
  29. devflow_toolkit-0.3.0/src/devflow/core/artifacts/models.py +82 -0
  30. devflow_toolkit-0.3.0/src/devflow/core/artifacts/store.py +130 -0
  31. devflow_toolkit-0.3.0/src/devflow/core/clock.py +67 -0
  32. devflow_toolkit-0.3.0/src/devflow/core/config.py +706 -0
  33. devflow_toolkit-0.3.0/src/devflow/core/constitution.py +166 -0
  34. devflow_toolkit-0.3.0/src/devflow/core/discovery.py +1304 -0
  35. devflow_toolkit-0.3.0/src/devflow/core/ports.py +159 -0
  36. devflow_toolkit-0.3.0/src/devflow/core/profile_manager.py +311 -0
  37. devflow_toolkit-0.3.0/src/devflow/core/project.py +533 -0
  38. devflow_toolkit-0.3.0/src/devflow/core/spec_workflow.py +932 -0
  39. devflow_toolkit-0.3.0/src/devflow/core/specification.py +2443 -0
  40. devflow_toolkit-0.3.0/src/devflow/core/state/__init__.py +75 -0
  41. devflow_toolkit-0.3.0/src/devflow/core/state/errors.py +39 -0
  42. devflow_toolkit-0.3.0/src/devflow/core/state/events.py +725 -0
  43. devflow_toolkit-0.3.0/src/devflow/core/state/locator.py +116 -0
  44. devflow_toolkit-0.3.0/src/devflow/core/state/lock.py +69 -0
  45. devflow_toolkit-0.3.0/src/devflow/core/state/manager.py +960 -0
  46. devflow_toolkit-0.3.0/src/devflow/core/state/models.py +164 -0
  47. devflow_toolkit-0.3.0/src/devflow/core/state/transitions.py +114 -0
  48. devflow_toolkit-0.3.0/src/devflow/models/__init__.py +6 -0
  49. devflow_toolkit-0.3.0/src/devflow/models/profile.py +63 -0
  50. devflow_toolkit-0.3.0/src/devflow/models/project.py +47 -0
  51. devflow_toolkit-0.3.0/src/devflow/profiles/ai-rag/constitution/ai-rag-standards.md +49 -0
  52. devflow_toolkit-0.3.0/src/devflow/profiles/ai-rag/profile.yaml +28 -0
  53. devflow_toolkit-0.3.0/src/devflow/profiles/base/constitution/architecture.md +58 -0
  54. devflow_toolkit-0.3.0/src/devflow/profiles/base/constitution/code-standards.md +85 -0
  55. devflow_toolkit-0.3.0/src/devflow/profiles/base/constitution/constitution.md +85 -0
  56. devflow_toolkit-0.3.0/src/devflow/profiles/base/profile.yaml +15 -0
  57. devflow_toolkit-0.3.0/src/devflow/profiles/django-backend/constitution/django-standards.md +64 -0
  58. devflow_toolkit-0.3.0/src/devflow/profiles/django-backend/profile.yaml +24 -0
  59. devflow_toolkit-0.3.0/src/devflow/profiles/fastapi-backend/constitution/fastapi-standards.md +59 -0
  60. devflow_toolkit-0.3.0/src/devflow/profiles/fastapi-backend/profile.yaml +23 -0
  61. devflow_toolkit-0.3.0/src/devflow/prompts/__init__.py +200 -0
  62. devflow_toolkit-0.3.0/src/devflow/prompts/discovery.md +119 -0
  63. devflow_toolkit-0.3.0/src/devflow/prompts/spec.greenfield.md +149 -0
  64. devflow_toolkit-0.3.0/src/devflow/prompts/spec.md +116 -0
  65. devflow_toolkit-0.3.0/tests/test_cli.py +293 -0
  66. devflow_toolkit-0.3.0/tests/test_discovery.py +600 -0
  67. devflow_toolkit-0.3.0/tests/test_event_log.py +550 -0
  68. devflow_toolkit-0.3.0/tests/test_greenfield.py +558 -0
  69. devflow_toolkit-0.3.0/tests/test_hardening.py +412 -0
  70. devflow_toolkit-0.3.0/tests/test_harness_adapters.py +516 -0
  71. devflow_toolkit-0.3.0/tests/test_spec_workflow.py +364 -0
  72. devflow_toolkit-0.3.0/tests/test_state.py +489 -0
  73. devflow_toolkit-0.3.0/tests/test_state_replay.py +307 -0
@@ -0,0 +1,9 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .mypy_cache/
7
+ dist/
8
+ build/
9
+ *.egg-info/
@@ -0,0 +1,146 @@
1
+ # Changelog
2
+
3
+ All notable changes to DevFlow Toolkit are documented in this file.
4
+
5
+ ## 0.3.0 - 2026-11-02
6
+
7
+ First public release. Persistent Discovery decides whether a request is
8
+ ready to become a specification. This release still covers the
9
+ discovery and specification stages only.
10
+
11
+ ### Added
12
+
13
+ - Persistent `.devflow/specs/<id>-<slug>/discovery.yaml` records with
14
+ questions, categories, blocking flags, answers and acceptance
15
+ metadata.
16
+ - Question classification for functional scope, user-visible behaviour,
17
+ data and persistence, security and authentication, external
18
+ integrations, architecture boundaries, dependencies and deployment.
19
+ - Blocking and non-blocking questions. Non-blocking questions may
20
+ remain pending without preventing specification generation.
21
+ - Proposed assumptions with `source: agent_default` and explicit
22
+ `pending_acceptance` / `accepted` status. DevFlow never accepts an
23
+ assumption on the user's behalf.
24
+ - `devflow spec --continue <id>` to resume a change across sessions.
25
+ - Deterministic Discovery for the `--no-agent` path. It stops when a
26
+ blocking decision remains and never invents an answer.
27
+ - Workflow status `awaiting_clarification`.
28
+ - Discovery as a registered artifact whose digest is bound into the
29
+ specification and into `approve --stage spec`.
30
+ - Approval binding to the declared architecture digest when a manifest
31
+ applies.
32
+ - Invalidation and archiving when Discovery changes before approval:
33
+ the old specification is marked stale, preserved under `history/`,
34
+ and regenerated with a new digest.
35
+ - Interactive Discovery prompt for harnesses that can record answers.
36
+ - Tests for Discovery classification, persistence, blocking, resume,
37
+ invalidation, non-blocking questions, legacy compatibility and
38
+ interactive recording.
39
+
40
+ ### Changed
41
+
42
+ - Package version is `0.3.0`.
43
+ - `spec` without `--continue` always creates a new change.
44
+ - `spec --continue` refuses an already approved or advanced change.
45
+ - `approve --stage spec` rejects incomplete Discovery and binds the
46
+ specification, Discovery and manifest digests.
47
+ - Legacy `0.2.0` changes without `discovery.yaml` remain approvable
48
+ with a warning.
49
+ - `status` reports Discovery status, questions, answers and assumption
50
+ acceptance.
51
+ - Prompts require the Discovery digest in the generated specification.
52
+
53
+ ### Known limitations
54
+
55
+ - Planning, implementation and review workflows are still not
56
+ implemented.
57
+ - Greenfield does not scaffold projects or generate application code.
58
+ - DevFlow does not certify architectural quality.
59
+ - Only OpenCode has been verified end-to-end.
60
+ - POSIX only; Windows is not supported.
61
+
62
+ ## 0.2.0 - 2026-11-01 (internal, unpublished)
63
+
64
+ Greenfield specification support. This release remains an internal
65
+ baseline and was not published to PyPI.
66
+
67
+ ### Added
68
+
69
+ - `ProjectMode` with `existing` (default) and `greenfield` contexts.
70
+ - `--project-mode` on `init` and `spec`, with per-run override and no
71
+ silent mode switching.
72
+ - `.devflow/architecture.yaml` as a persistent, reviewable declared
73
+ architecture manifest separate from `config.yaml`.
74
+ - Safe manifest template creation that never overwrites user files.
75
+ - Structural manifest validation for required values, duplicate names,
76
+ unknown references, dependency-cycle warnings, invalid YAML, symlink
77
+ escapes and size limits.
78
+ - Greenfield context and prompt selection without extracting a new
79
+ workflow abstraction.
80
+ - Deterministic Greenfield specifications with target architecture,
81
+ architecture decisions and risks, and the 11-section contract.
82
+ - `Appendix A: Declared Architecture Manifest` with the manifest digest
83
+ in the generated specification and context.
84
+ - Existing-mode specifications treat a present manifest as an
85
+ architectural constraint.
86
+ - Backward-compatible configuration: projects without `project.mode`
87
+ load as `existing`.
88
+
89
+ ### Changed
90
+
91
+ - Package version is `0.2.0`.
92
+ - Existing-mode specifications record the project mode.
93
+ - The agent-output cleaner preserves a trailing fenced manifest
94
+ appendix instead of stripping it.
95
+
96
+ ### Known limitations
97
+
98
+ - Planning, implementation and review workflows are still not
99
+ implemented.
100
+ - Greenfield does not scaffold projects or generate application code.
101
+ - DevFlow does not certify architectural quality.
102
+ - Only OpenCode has been verified end-to-end.
103
+ - POSIX only; Windows is not supported.
104
+
105
+ ## 0.1.0 - 2026-10-31
106
+
107
+ Initial MVP release. This release covers the specification stage only.
108
+
109
+ ### Added
110
+
111
+ - Installable `devflow` CLI with `init`, `spec`, `status`, `approve` and
112
+ `version` commands.
113
+ - Project detection for Python, JavaScript/TypeScript, Go, Rust, PHP,
114
+ Ruby, Java and common frameworks and databases.
115
+ - Bundled base, Django, FastAPI and AI/RAG profiles.
116
+ - Project constitution installation without overwriting existing files.
117
+ - Project configuration with contained paths and managed file markers.
118
+ - Harness-independent specification workflow with deterministic static
119
+ analysis, context generation and structural validation.
120
+ - OpenCode integration, verified end-to-end in non-interactive mode.
121
+ - Integration scaffolds for Codex, Claude Code and Kiro (unverified in
122
+ this release).
123
+ - Digest-bound specification approvals.
124
+ - Append-only `events.jsonl` event log with `workflow.yaml` projection,
125
+ full replay, semantic validation, stale detection and recovery.
126
+ - Atomic artifact, configuration and integration-file writes.
127
+ - Per-change locks and serialized specification id allocation.
128
+ - Explicit rejection of paths and symlinks that escape the project.
129
+
130
+ ### Security
131
+
132
+ - Constitution document names must be plain file names inside the
133
+ constitution directory.
134
+ - Symlinks and project files resolving outside the project root are
135
+ rejected or ignored during detection and analysis.
136
+ - Managed integration files cannot follow symlinks outside the project.
137
+ - Existing user files, specifications and approvals are preserved.
138
+
139
+ ### Known limitations
140
+
141
+ - Planning, implementation and review workflows are not implemented.
142
+ - Only OpenCode has been verified end-to-end.
143
+ - Interactive harness mode is implemented but not part of the verified
144
+ release path.
145
+ - POSIX only; Windows is not supported.
146
+ - Static analysis is heuristic and requires human review.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DevFlow contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.