devflow-kit 3.6.0 → 3.8.0

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 (197) hide show
  1. package/CHANGELOG.md +438 -1
  2. package/README.md +15 -11
  3. package/dist/agents/code.md +9 -15
  4. package/dist/agents/design.md +1 -1
  5. package/dist/agents/fix.md +11 -13
  6. package/dist/agents/git.md +1 -1
  7. package/dist/agents/harden.md +1 -1
  8. package/dist/agents/refactor.md +7 -10
  9. package/dist/agents/review.md +6 -4
  10. package/dist/agents/skim.md +2 -2
  11. package/dist/agents/triage.md +2 -2
  12. package/dist/cli/commands/capture.js +1 -1
  13. package/dist/cli/commands/curation-move-io.js +102 -0
  14. package/dist/cli/commands/curation-move-step.js +374 -0
  15. package/dist/cli/commands/{learning.js → curation.js} +302 -99
  16. package/dist/cli/commands/gate-level-prompts.js +426 -0
  17. package/dist/cli/commands/gates.js +299 -0
  18. package/dist/cli/commands/init-seed.js +16 -5
  19. package/dist/cli/commands/init.js +263 -54
  20. package/dist/cli/commands/memory.js +20 -2
  21. package/dist/cli/commands/prompt-io.js +37 -0
  22. package/dist/cli/commands/uninstall.js +81 -9
  23. package/dist/cli.js +4 -2
  24. package/dist/commands/bug-analysis.md +25 -36
  25. package/dist/commands/code-review.md +77 -73
  26. package/dist/commands/debug.md +5 -5
  27. package/dist/commands/dynamic-build.md +76 -83
  28. package/dist/commands/dynamic-plan.md +5 -5
  29. package/dist/commands/dynamic-profile.md +5 -5
  30. package/dist/commands/dynamic-tickets.md +5 -5
  31. package/dist/commands/explore.md +6 -6
  32. package/dist/commands/implement.md +68 -102
  33. package/dist/commands/plan.md +19 -29
  34. package/dist/commands/release.md +5 -5
  35. package/dist/commands/research.md +6 -6
  36. package/dist/commands/resolve.md +29 -31
  37. package/dist/commands/self-review.md +5 -13
  38. package/dist/core/assets.js +20 -20
  39. package/dist/core/curate-tuning-config.js +5 -6
  40. package/dist/core/curation-move-notice.js +84 -0
  41. package/dist/core/curation-move-skip.js +36 -0
  42. package/dist/core/curation-move.js +35 -0
  43. package/dist/core/curation-queue-cleanup.js +134 -0
  44. package/dist/core/curation-store.js +98 -0
  45. package/dist/core/{learning-variants.js → curation-variants.js} +65 -41
  46. package/dist/core/echo-value.js +48 -0
  47. package/dist/core/evidence-policy.js +18 -6
  48. package/dist/core/feature-switch.js +95 -19
  49. package/dist/core/fs-atomic.js +1 -1
  50. package/dist/core/gate-level.js +221 -0
  51. package/dist/core/git.js +16 -14
  52. package/dist/core/ledger-root.js +82 -22
  53. package/dist/core/linked-path.js +4 -4
  54. package/dist/core/manifest-lock.js +238 -0
  55. package/dist/core/manifest.js +84 -24
  56. package/dist/core/migrations.js +1 -13
  57. package/dist/core/model-discovery.js +7 -1
  58. package/dist/core/observations.js +2 -2
  59. package/dist/core/plugins.js +15 -15
  60. package/dist/core/pool.js +26 -0
  61. package/dist/core/project-paths.js +103 -34
  62. package/dist/core/queue-drain.js +2 -2
  63. package/dist/core/tracked-areas.js +35 -0
  64. package/dist/core/tracker.js +6 -34
  65. package/dist/{learning-off → curation-off}/agents/code.md +9 -15
  66. package/dist/{learning-off → curation-off}/agents/fix.md +11 -13
  67. package/dist/{learning-off → curation-off}/agents/refactor.md +7 -10
  68. package/dist/{learning-off → curation-off}/agents/review.md +5 -3
  69. package/dist/{learning-off → curation-off}/agents/triage.md +1 -1
  70. package/dist/{learning-off → curation-off}/commands/bug-analysis.md +20 -31
  71. package/dist/{learning-off → curation-off}/commands/code-review.md +74 -70
  72. package/dist/{learning-off → curation-off}/commands/debug.md +2 -2
  73. package/dist/{learning-off → curation-off}/commands/dynamic-build.md +73 -80
  74. package/dist/{learning-off → curation-off}/commands/explore.md +2 -2
  75. package/dist/{learning-off → curation-off}/commands/implement.md +65 -99
  76. package/dist/{learning-off → curation-off}/commands/plan.md +15 -25
  77. package/dist/{learning-off → curation-off}/commands/resolve.md +26 -28
  78. package/dist/{learning-off → curation-off}/commands/self-review.md +2 -10
  79. package/dist/hud/components/{learning-counts.js → curation-counts.js} +36 -17
  80. package/dist/hud/config.js +1 -1
  81. package/dist/hud/index.js +6 -6
  82. package/dist/hud/render.js +3 -3
  83. package/dist/skills/git/references/pr/validate-branch.md +8 -5
  84. package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +20 -14
  85. package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +20 -20
  86. package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +20 -20
  87. package/dist/targets/claude-code/{learning-install.js → curation-install.js} +99 -67
  88. package/dist/targets/claude-code/installer.js +15 -15
  89. package/dist/targets/claude-code/language-stamp.js +5 -5
  90. package/dist/targets/claude-code/post-install.js +2 -2
  91. package/dist/targets/claude-code/tracker-servers.js +1 -1
  92. package/package.json +3 -2
  93. package/src/assets/agents/_partials/_code.mds +16 -17
  94. package/src/assets/agents/code.mds +4 -7
  95. package/src/assets/agents/curate.md +12 -14
  96. package/src/assets/agents/debug.mds +6 -6
  97. package/src/assets/agents/design.mds +18 -18
  98. package/src/assets/agents/fix.mds +6 -5
  99. package/src/assets/agents/git.mds +1 -1
  100. package/src/assets/agents/harden.mds +7 -7
  101. package/src/assets/agents/knowledge.mds +23 -23
  102. package/src/assets/agents/refactor.mds +2 -2
  103. package/src/assets/agents/research.mds +15 -15
  104. package/src/assets/agents/review.mds +45 -43
  105. package/src/assets/agents/skim.mds +11 -11
  106. package/src/assets/agents/synthesize.md +2 -2
  107. package/src/assets/agents/triage.mds +22 -22
  108. package/src/assets/agents/validate.md +13 -26
  109. package/src/assets/commands/_partials/_decisions.mds +13 -13
  110. package/src/assets/commands/_partials/_engine.mds +8 -8
  111. package/src/assets/commands/_partials/_knowledge.mds +29 -15
  112. package/src/assets/commands/_partials/_preamble.mds +4 -4
  113. package/src/assets/commands/_partials/_settings.mds +3 -3
  114. package/src/assets/commands/_partials/_wave.mds +17 -24
  115. package/src/assets/commands/bug-analysis.mds +37 -48
  116. package/src/assets/commands/code-review.mds +90 -86
  117. package/src/assets/commands/debug.mds +14 -14
  118. package/src/assets/commands/dynamic-build.mds +78 -78
  119. package/src/assets/commands/dynamic-plan.mds +22 -22
  120. package/src/assets/commands/dynamic-profile.mds +2 -2
  121. package/src/assets/commands/dynamic-tickets.mds +8 -8
  122. package/src/assets/commands/explore.mds +20 -20
  123. package/src/assets/commands/implement.mds +92 -118
  124. package/src/assets/commands/plan.mds +41 -51
  125. package/src/assets/commands/release.mds +12 -12
  126. package/src/assets/commands/research.mds +19 -19
  127. package/src/assets/commands/resolve.mds +56 -50
  128. package/src/assets/commands/self-review.mds +20 -20
  129. package/src/assets/mds/git/_ops.mds +3 -1
  130. package/src/assets/mds/git/_ops_pr.mds +1 -1
  131. package/src/assets/mds/git/_ops_steps.mds +13 -7
  132. package/src/assets/mds/git/_pr.mds +7 -4
  133. package/src/assets/mds/tracker/_common.mds +23 -12
  134. package/src/assets/mds/tracker/_github.mds +2 -9
  135. package/src/assets/mds/tracker/_jira.mds +2 -15
  136. package/src/assets/mds/tracker/_linear.mds +2 -15
  137. package/src/assets/rules/quality.md +1 -0
  138. package/src/assets/scripts/ci-wait.cjs +22 -4
  139. package/src/assets/scripts/claude-md-audit.cjs +66 -51
  140. package/src/assets/scripts/hooks/background-memory-update +406 -97
  141. package/src/assets/scripts/hooks/capture-prompt +12 -12
  142. package/src/assets/scripts/hooks/capture-question +11 -11
  143. package/src/assets/scripts/hooks/capture-turn +12 -12
  144. package/src/assets/scripts/hooks/{learning-lock → curation-lock} +2 -2
  145. package/src/assets/scripts/hooks/curation-move +293 -0
  146. package/src/assets/scripts/hooks/ensure-devflow-init +45 -13
  147. package/src/assets/scripts/hooks/ensure-proxy +4 -4
  148. package/src/assets/scripts/hooks/ensure-root-gitignore +4 -4
  149. package/src/assets/scripts/hooks/git-marker +81 -0
  150. package/src/assets/scripts/hooks/json-helper.cjs +145 -51
  151. package/src/assets/scripts/hooks/json-parse +19 -4
  152. package/src/assets/scripts/hooks/lib/curation-move.cjs +1582 -0
  153. package/src/assets/scripts/hooks/lib/{learning-store.cjs → curation-store.cjs} +242 -118
  154. package/src/assets/scripts/hooks/lib/decisions-format.cjs +3 -3
  155. package/src/assets/scripts/hooks/lib/mkdir-lock.cjs +24 -7
  156. package/src/assets/scripts/hooks/lib/project-paths.cjs +132 -39
  157. package/src/assets/scripts/hooks/lib/render-decisions.cjs +34 -22
  158. package/src/assets/scripts/hooks/lib/tracked-areas.cjs +259 -0
  159. package/src/assets/scripts/hooks/memory-permission +358 -0
  160. package/src/assets/scripts/hooks/memory-worker +1 -1
  161. package/src/assets/scripts/hooks/pre-compact-memory +6 -16
  162. package/src/assets/scripts/hooks/queue-append +228 -103
  163. package/src/assets/scripts/hooks/resolve-project-root +2 -2
  164. package/src/assets/scripts/hooks/session-start-context +145 -71
  165. package/src/assets/scripts/hooks/session-start-memory +27 -46
  166. package/src/assets/scripts/lib/project-config.cjs +31 -9
  167. package/src/assets/scripts/resolve-base.cjs +1043 -0
  168. package/src/assets/scripts/resolve-settings.cjs +238 -46
  169. package/src/assets/skills/agent-references/SKILL.md +9 -2
  170. package/src/assets/skills/agent-references/references/commands/code-review-levels.md +19 -0
  171. package/src/assets/skills/agent-references/references/commands/implement-levels.md +27 -0
  172. package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +6 -4
  173. package/src/assets/skills/agent-references/references/commands/plan-levels.md +40 -0
  174. package/src/assets/skills/agent-references/references/commands/resolve-levels.md +24 -0
  175. package/src/assets/skills/agent-references/references/synthesize/planning.md +9 -22
  176. package/src/assets/skills/agent-references/references/synthesize/review.md +11 -11
  177. package/src/assets/skills/apply-decisions/SKILL.md +1 -1
  178. package/src/assets/skills/docs-framework/SKILL.md +7 -7
  179. package/src/assets/skills/docs-framework/references/patterns.md +3 -4
  180. package/src/assets/skills/quality-gates/SKILL.md +1 -1
  181. package/src/assets/skills/worktree-support/references/roots.md +2 -2
  182. package/templates/lint-pack/.lint-pack.conf +86 -0
  183. package/templates/lint-pack/README.md +190 -0
  184. package/templates/lint-pack/lint-pack.sh +905 -0
  185. package/dist/core/learning-queue-cleanup.js +0 -27
  186. package/dist/core/learning-store.js +0 -61
  187. /package/dist/{learning-off → curation-off}/agents/debug.md +0 -0
  188. /package/dist/{learning-off → curation-off}/agents/design.md +0 -0
  189. /package/dist/{learning-off → curation-off}/agents/harden.md +0 -0
  190. /package/dist/{learning-off → curation-off}/agents/knowledge.md +0 -0
  191. /package/dist/{learning-off → curation-off}/agents/research.md +0 -0
  192. /package/dist/{learning-off → curation-off}/agents/skim.md +0 -0
  193. /package/dist/{learning-off → curation-off}/commands/dynamic-plan.md +0 -0
  194. /package/dist/{learning-off → curation-off}/commands/dynamic-profile.md +0 -0
  195. /package/dist/{learning-off → curation-off}/commands/dynamic-tickets.md +0 -0
  196. /package/dist/{learning-off → curation-off}/commands/release.md +0 -0
  197. /package/dist/{learning-off → curation-off}/commands/research.md +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,441 @@ All notable changes to Devflow will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.8.0] - 2026-10-21
9
+
10
+ ### Upgrade notes — Curation rename
11
+
12
+ The learning feature is now called curation ([#529](https://github.com/dean0x/devflow/issues/529)).
13
+ This is a breaking change. It releases as a minor version (3.8.0).
14
+ Devflow keeps no alias for the old command and the old init flags. The old switch keys stay readable, as the table shows. Read the steps that you must do by hand.
15
+
16
+ **Superseding statement for 3.6.0:** The 3.6.0 notes say that `devflow learning`, `features.learning`,
17
+ `.devflow/learning/` and the learning ops do not change. That statement is no longer true.
18
+ This release changes all of them. The 3.6.0 text stays as released.
19
+
20
+ **What you must do:**
21
+ - Run `devflow init` after you update.
22
+ - Replace `devflow learning` and the old init flags in your scripts.
23
+ - Delete each backup folder after `devflow curation --status` shows 0 pending rows for it.
24
+ A backup made on re-upgrade can hold the only copy of entries that 3.7 wrote. Check them before you delete it.
25
+ - Delete the leftover `.devflow/learning/` folder in each linked worktree whose main checkout has a `.devflow/` folder
26
+ and is not your home folder.
27
+ A worktree whose main checkout has no `.devflow/` folder, or is your home folder, keeps a live ledger.
28
+ That ledger moves like any project.
29
+ - Run `devflow curation --enable` if the machine switch is off and you want it on.
30
+
31
+ **Renamed names:**
32
+
33
+ | Old name | New name |
34
+ |----------|----------|
35
+ | `devflow learning` | `devflow curation` |
36
+ | `devflow init --learning` and `--no-learning` | `devflow init --curation` and `--no-curation` |
37
+ | `features.learning` in `~/.devflow/manifest.json` | `features.curation` (the old key stays as a mirror) |
38
+ | `features.learning` in a repository `project.json` or `config.json` | `features.curation` (the old key is still read) |
39
+ | `.devflow/learning/` | `.devflow/curation/` |
40
+ | `learning.json` (in the project folder and in `~/.devflow/`) | `curation.json` |
41
+ | Settings line field `LEARNING=` | `CURATION=` |
42
+ | Prompt markers `<!-- learning:on -->` and the build output `dist/learning-off/` | `<!-- curation:on -->` and `dist/curation-off/` |
43
+ | HUD label `Learning:` | `Curation:` |
44
+ | Session start headers `--- LEARNING MAINTENANCE ---` and `--- LEARNING PAUSED ---` | `--- CURATION MAINTENANCE ---` and `--- CURATION PAUSED ---` |
45
+ | Hook files `learning-lock` and `lib/learning-store.cjs` | `curation-lock` and `lib/curation-store.cjs` (init removes the old files) |
46
+
47
+ These names do not change: the `self-learning:` source stamp in rendered rows, the design-decision IDs,
48
+ the `decisions-*.jsonl` files, the `apply-decisions` skill, the learn-conventions family and the
49
+ `agents.learning.model` key (it stays an older name for the Curate agent model).
50
+
51
+ **Breaking change:**
52
+ - `devflow learning`, `devflow init --learning` and `devflow init --no-learning` now fail.
53
+ They give the unknown command or option error, and the exit code is 1.
54
+ - Change every script, alias and note that uses an old name.
55
+
56
+ **What the migration does:**
57
+ - `devflow init` moves the learning data of each project that it finds, and of the project where you run it.
58
+ The move takes the ledger files, the queue and the project tuning file. Entry IDs do not change.
59
+ Devflow renders the index again at the new path.
60
+ - Init also renames `~/.devflow/learning.json` to `curation.json`.
61
+ If both names exist, the new one wins, the old one stays, and init logs one line.
62
+ - The session start hook makes the same move for the project of each session.
63
+ It also runs when the curation switch is off.
64
+ - If a project already has both folders, one rule decides which folder stays.
65
+ If `.devflow/curation/` has a non-empty log, it wins and the old folder becomes the backup.
66
+ If not, the old ledger set moves in and the rest of the old folder becomes the backup.
67
+ Devflow never merges one ledger into the other.
68
+ - After an upgrade, the first `devflow` command that loads the whole manifest
69
+ (for example `devflow init` or `devflow flags --status`) heals `~/.devflow/manifest.json`.
70
+ The file then carries both `features.curation` and `features.learning` with the same value.
71
+ Every later write keeps the two keys equal.
72
+ The `--status` commands of curation, memory, knowledge and gates write nothing.
73
+
74
+ **Upgrade, downgrade and re-upgrade:**
75
+ - Upgrade: run `devflow init` (a full init, not `--hud-only`). Until you do, the installed prompts and agents are still the old version.
76
+ `devflow init --hud-only` and a plugin-only update install the new hooks and settings script, but not the new prompts.
77
+ The old prompts do not accept the `CURATION=` field, so they use their fail-closed settings until you run a full `devflow init`.
78
+ - Downgrade to 3.7: 3.7 does not read `.devflow/curation/`. It starts a new empty ledger in `.devflow/learning/`.
79
+ Your moved data stays in `.devflow/curation/`. The mirror key `features.learning` keeps a 3.8 opt-out in force.
80
+ - Re-upgrade to 3.8: the next init or session start finds both folders and applies the rule above.
81
+ When the folder `.devflow/curation/` has a non-empty log, it wins.
82
+ The queue rows of the 3.7 folder merge into the winner. The entries that 3.7 wrote stay in the backup only.
83
+ - The Curate model in the global tuning file: init renames `~/.devflow/learning.json` to `~/.devflow/curation.json`,
84
+ and 3.7 reads only the old name. After a downgrade, set the Curate model again with `devflow learning --configure`.
85
+ Choose the global scope. On re-upgrade, an existing `curation.json` wins and init logs one line.
86
+ To keep a value that you set on 3.7, delete `curation.json` first.
87
+
88
+ **The machine switch:**
89
+ - If `features.curation` and `features.learning` in the manifest disagree, the switch is off.
90
+ A reader never treats a disagreement as on.
91
+ - To turn it on again, run `devflow curation --enable`. This writes both keys.
92
+ - A 3.7 toggle writes only the old key. An opt-out made on 3.7 stays in force after you upgrade again.
93
+ If you ran no 3.7 `devflow init`, an enable made on 3.7 after a 3.8 disable stays off until you run `devflow curation --enable`.
94
+ - A 3.7 `devflow init` removes the key `features.curation`. After that, only the old key carries the opt-out.
95
+ A 3.7 enable made after that init then takes effect when you upgrade again.
96
+ - Between the package update and `devflow init`, `devflow curation --enable` and `--disable` write both keys
97
+ and move nothing. Only `--disable` drains the queue among these toggles. The commands `--restore`, `--clear`, `--reset`
98
+ and `--configure` (project scope) refuse until you run `devflow init`.
99
+
100
+ **The backup:**
101
+ - Where: `.devflow/learning.backup-<stamp>-<8 hex>` in the project, one folder for each move.
102
+ A move makes a backup only where a project had both folders.
103
+ - No devflow command deletes a backup, except `devflow uninstall`.
104
+ Uninstall removes the backups of the project at the git root of your current directory, with that project's data, after you confirm.
105
+ `devflow curation --reset` and `devflow curation --clear` leave the backup in place.
106
+ - A disable drains the queue files in the backups. `devflow curation --disable`, and `devflow init` with curation switched off,
107
+ remove the queue, claim, private and overflow files in each backup folder (at most 500 folders, and 200 files in each).
108
+ The ledger files, the swept files and the claim owner file stay in the backup.
109
+ Without this drain, a later `--enable` and init would merge those rows into the live queue.
110
+ The drain deletes nothing when a backup folder, or one of its queue files, is a symbolic link, and it says so.
111
+ The drain also deletes nothing when git tracks any entry under a data folder or a backup folder, or when a `.git` entry stands and git does not answer.
112
+ It then prints the notice that the git check shows (see Outcomes that need action).
113
+ If the backups cannot be listed for another reason, the drain still removes the queue files of the live and the old folder, and prints a warning that the backups were not drained.
114
+ - `devflow curation --status` prints one `Backup:` line for each backup folder.
115
+ The line shows how many pending rows the backup still holds.
116
+ For the first 50 folders it prints one line each. One more line counts the folders from the 51st to the 500th and their pending rows.
117
+ If there are more than 500 backup folders, a last line counts the folders after the 500th. Status does not read them, and no init or drain reaches them.
118
+ - Delete a backup folder only when `devflow curation --status` shows 0 pending rows for it.
119
+ Until then, a later init can still merge the rows.
120
+ A backup made on re-upgrade can hold the only copy of entries that 3.7 wrote. Check them before you delete it.
121
+ - An init merges rows from at most 50 backup folders in one run. It passes over a folder that holds no pending rows,
122
+ so a later folder is reached when the earlier ones are done.
123
+
124
+ **The queue cap:**
125
+ - A merge fills a pending queue up to 100 lines and no further.
126
+ A capture trim keeps the newest 100 lines and starts only above 200 lines, so a merge never causes a trim.
127
+ - Rows that do not fit wait in overflow files in the backup. A later init merges them as room appears.
128
+ Status counts them as pending rows, so the delete step waits for zero pending rows.
129
+ - The move drops no row, and it never causes a trim.
130
+ A queue that holds more than 200 lines is still trimmed to its newest 100 lines when a capture arrives.
131
+ This is the rule from before 3.8.0, and the move does not change it.
132
+ - `devflow init` drains the queue of a project where curation is off, as it did before 3.8.0.
133
+
134
+ **Outcomes that need action:**
135
+ - Busy: another run holds the move lock. Init prints `Ledger move skipped for <root>: a lock is held.`
136
+ A curation command prints `Another run is moving this project's curation data.`
137
+ Nothing is written. Wait a moment, then run the command again. A session start retries by itself.
138
+ When a queue claim holds the move, init prints `Ledger move skipped for <root>: a queue claim holds the move.`
139
+ A curation command prints `A Curate run holds this project's curation queue, and the move waits for it.`
140
+ The move runs after Curate finishes, which can take up to 15 minutes. Run the command again after that.
141
+ - Refused: a symbolic link sits on the path, or a private, swept or overflow queue file sits directly in the old folder.
142
+ Nothing moves. Init prints `Ledger move refused for <root>`.
143
+ The HUD and `devflow curation --status` print `Curation: move refused, see the hook log`.
144
+ Remove the cause, then run `devflow init` or start a new session.
145
+ - Skipped by the git check: git tracks any entry under `.devflow/learning/`, `.devflow/curation/` or a backup folder
146
+ (`.devflow/learning.backup-*`), or tracks an entry named `.devflow` ([#598](https://github.com/dean0x/devflow/issues/598)). The same outcome applies when a `.git` entry stands and git does not answer.
147
+ Nothing in the project changes. Init prints `Ledger move skipped for <root>` and a fixed notice that holds nothing from the repository.
148
+ The HUD prints `Curation: move skipped, git tracks files in the .devflow data folders`
149
+ or `Curation: move skipped, git did not answer`.
150
+ `devflow curation --status`, `--list` and `--show` print the whole notice. The HUD and these commands print the skip also when `.devflow/curation/` exists.
151
+ While the old folder is there, `--restore`, `--clear`, `--reset` and `--configure` (project scope) print the notice, change nothing and exit 1.
152
+ `--enable` and `--disable` print the notice as a warning, and their exit code does not change.
153
+ `--disable`, `--clear` and an init with curation off delete no queue file in these cases, and each prints the notice once.
154
+ When init has printed the notice in its `Ledger move skipped for <root>` line, its drain adds only `The curation queue was not drained.`
155
+ When git tracks files, the notice tells you to run `git ls-files .devflow`, and then `git rm --cached <file>`, in the checkout that holds the folders.
156
+ When git does not answer, the notice tells you to check that git runs in the project. The move runs again at the next session start or the next init.
157
+ A session start runs the check again in both cases.
158
+ - Not yet moved: `devflow curation --status`, `--list`, `--show` and the HUD print
159
+ `Curation: run devflow init, or open Claude Code in this project after it`.
160
+ They do not read the old folder.
161
+ - Failed: init prints `Ledger move failed for <root>` and copies nothing. The next init tries again.
162
+ A move that fails at session start shows the same `Curation: move refused, see the hook log` line as a refusal.
163
+ The hook log names the cause. The next session start tries again.
164
+ - Skipped, no repository: git did not name the project's repository within one second, for example on a hung mount.
165
+ Init prints `Ledger move skipped for <root>: git did not answer in time.` and does not count the project as moved.
166
+ The other projects move. The next init tries again, and a session start in the project moves it too.
167
+
168
+ **What stays behind:**
169
+ - Reach: a project that neither `devflow init` nor a Claude Code session reaches keeps its old
170
+ `.devflow/learning/` folder untouched. It moves at its next session start.
171
+ - Linked worktrees: if the main checkout has a `.devflow/` folder and is not your home folder,
172
+ the ledger of a linked worktree is the ledger of the main checkout.
173
+ Devflow does not move a `.devflow/learning/` folder that sits inside that worktree.
174
+ Delete that leftover folder by hand when you do not need it.
175
+ If the main checkout does not meet this condition, the `.devflow/learning/` folder of the worktree is a live ledger.
176
+ It moves like any project.
177
+ - First session: the first session start in a project with an old folder runs the move.
178
+ This adds a short delay to that one start. Later starts add nothing.
179
+
180
+ **Mixed-version teams:**
181
+ - A 3.7 install reads only `features.learning` in a committed `.devflow/project.json`.
182
+ A 3.8 install reads both keys and narrows when either key is `false`.
183
+ - Keep the old key in committed files, or set both keys, until every team member runs 3.8.
184
+
185
+ ### Upgrade notes — Lint pack
186
+
187
+ **Stale-install window:**
188
+ - Until you run `devflow init`, the installed `/implement` and Validate do not run the lint pack.
189
+
190
+ ### Upgrade notes — Base resolver
191
+
192
+ The base resolver ([#495](https://github.com/dean0x/devflow/issues/495)) adds stops and a script call.
193
+ Do the step below after you update.
194
+
195
+ **What you must do:**
196
+ - Run `devflow init` after you update. A full init installs `resolve-base.cjs` and the updated commands.
197
+
198
+ **Stops:**
199
+ - `/implement` stops when no usable base exists, for example in a shallow clone without the base history. `/code-review` and `/bug-analysis` stop in that case on a full-range run. The message names the cause and the fix: `git fetch --unshallow`, `git fetch origin <base>`, or a re-run (and `devflow init` if the re-run repeats the stop).
200
+ - The same three commands stop on a base branch name outside the allowed set, or one that git refuses. The message states the set.
201
+ - In `/code-review` multi-worktree mode, a rejected base blocks only that worktree.
202
+ - `/code-review` and `/bug-analysis` stop when the branch name does not fit the allowed characters and length. The message states the allowed characters. In `/code-review` multi-worktree mode, this blocks only that worktree.
203
+ - The Git agent's `validate-branch` returns BLOCKED in the same cases. `/resolve` takes its branch diff from it.
204
+ - The Git agent's `ensure-pr-ready` stops only on a base name outside the allowed set, or one that git refuses. For any other base stop it prints `TRACEABILITY: DEGRADED (base {REASON}; fix: {fix})` and goes on.
205
+ - `/dynamic-build`: a ticket whose setup reports no base commit stops with the `base-missing` escalation. Check the setup output, then re-run.
206
+
207
+ **New resolver call:**
208
+ - `ensure-pr-ready` calls `resolve-base.cjs` in `pr` mode with the base branch of the PR, or with the default branch when no PR applies. The call makes at most one fetch of the base branch.
209
+ - `/implement` passes the base ref that it resolved in Phase 1, so a normal `/implement` run makes one fetch.
210
+ - The `/dynamic-build` wave PR step runs `ensure-pr-ready` with no base ref, so that step makes this call.
211
+ - The base resolver reads the base name from standard input (`--name-stdin`), so the name is not part of shell command text ([#561](https://github.com/dean0x/devflow/issues/561)).
212
+ - The Git agent's `ensure-pr-ready` and `validate-branch` write the base name to a file. The step checks the status of both `gh` calls. It treats `gh` as failed when either status is not 0.
213
+ - In `ensure-pr-ready` and `validate-branch`, a name file whose only content is an empty line counts as empty. The default-branch path then takes `main`, or else `master`.
214
+ - `validate-branch` takes the default branch as the base when no PR applies: the branch has none, `gh` is missing or logged out, or the repository has no GitHub remote.
215
+
216
+ **Stale-install window:**
217
+ - Until you run `devflow init`, the installed commands and Git agent do not call the resolver.
218
+
219
+ **Known limits:**
220
+ - A fetch that stops at its 45-second bound can leave a `refs/remotes/origin/<name>.lock` file in the git directory. Later runs then report `fetch-failed` until you delete the file.
221
+ - The fetch needs git 2.29 or newer. With an older git, every run reports `fetch-failed` and prints the base warning.
222
+ - The fetch runs no askpass program. Where an askpass program is the only credential source, a remote that needs credentials gives `fetch-failed` on every run, with the base warning.
223
+
224
+ ### Upgrade notes — Review markers
225
+
226
+ **What changes:**
227
+ - Incremental review and analysis markers are stored under the git directory of each worktree; the first run after the update covers the full branch.
228
+
229
+ ### Upgrade notes — Review ranges
230
+
231
+ **What changes:**
232
+ - `/dynamic-build`: in single-ticket mode, the review covers the diff from the commit the ticket branch was forked from to HEAD. On a non-default start branch, that is the ticket's own commits.
233
+ - `/dynamic-build`: the wave evidence step lists the changed files with a diff from the base ref of the wave PR. The base ref must be a commit ID of 40 or 64 lowercase hex digits, and the diff must exit 0. If not, the step is skipped, and the run summary holds `TRACEABILITY: DEGRADED (wave base unusable)`.
234
+ - A Review agent with no patch file and no usable diff range returns `reviewed: false`. After one retry, the engine records a coverage gap, and the run verdict is never PASS.
235
+
236
+ ### Upgrade notes — Level readers
237
+
238
+ **Stale-install window:**
239
+ - If an installed `/implement` or `/resolve` is newer than its installed level reference, the reference stays unreadable until you run `devflow init`.
240
+
241
+ ### Upgrade notes — Polish by level
242
+
243
+ **What you must do:**
244
+ - The default level, `standard`, now skips Polish in `/implement` and `/resolve`. Run `devflow gates --set full` to keep Polish.
245
+ - A quality rule that you keep at `~/.devflow/rules/quality.md` replaces the shipped one. At `standard` and `lean`, you then lose Polish and do not get the new bullet. Add the bullet to your copy. Or run `devflow rules unshadow quality`, which deletes your copy, and then run `devflow init`.
246
+
247
+ **Stale-install window:**
248
+ - Until you run `devflow init`, your install has no level row that skips Polish, so Polish still runs at every level. An install from 3.7.0 has no level reference at all. The installed quality rule also lacks its new bullet.
249
+
250
+ ### Upgrade notes — Harden by level
251
+
252
+ **What you must do:**
253
+ - At `lean`, `/implement` now skips Harden on a docs-only diff. Run `devflow gates --set standard` or `--set full` to keep Harden on every diff.
254
+
255
+ **Stale-install window:**
256
+ - Until you run `devflow init`, your installed level reference has no Harden row, so Harden runs at every level.
257
+
258
+ ### Added
259
+
260
+ - **`devflow init` asks for the gate level** ([#543](https://github.com/dean0x/devflow/issues/543), [#507](https://github.com/dean0x/devflow/issues/507)).
261
+ - `devflow gates --set <level>` and `devflow init` set the machine gate level, so a user who runs `init` learns that the level exists.
262
+ An interactive `init` asks for it: `full`, `standard` or `lean`, each with a one-line effect.
263
+ On a first install the prompt starts on `standard`.
264
+ On a re-init it shows the current value and starts on it, so Enter keeps a valid level.
265
+ A malformed or `null` stored value starts the prompt on `full`, and if you accept it, init writes `full` in its place. The machine level that applies does not change.
266
+ - `devflow init --gate-level <full|standard|lean>` sets the machine level with no prompt, in an interactive or a non-interactive run.
267
+ A bad value, or no value, exits 1 before `init` writes anything and names the valid levels. The flag cannot be combined with `--hud-only`.
268
+ `devflow init --recommended` and a non-interactive `init` show no prompt and keep the stored value.
269
+ - The Recommended settings note has a `Gate level:` row.
270
+ The summary at the end of `init` shows the level that is set, and adds `(was X)` when the run changes the machine level that applies.
271
+ `init` writes the same machine default as `devflow gates --set`, and a personal `gateLevel` in a repository's `.devflow/config.json` still wins there.
272
+ - If `~/.devflow/manifest.json` is valid JSON with a `features` object that devflow rejects (a field is missing or mistyped, or a byte-order mark leads), a promptless `init` and `init --hud-only` keep the gate level stored in it, as it is stored, and warn that they kept the level while they replaced the file.
273
+ When the prompt runs, your answer is the level. If you accept a malformed or `null` value, init writes `full`.
274
+ - If the manifest is corrupt, is not JSON, has no `features` object, or is over 1 MiB and also one that devflow rejects, `init` cannot read the level.
275
+ The prompt shows `Current setting: unknown` and starts on `standard`.
276
+ A promptless `init` or `init --hud-only` records no level and warns that `standard` applies and that `devflow gates --set <level>` sets it again.
277
+ `devflow gates --status` words its manifest warning for each case.
278
+ - `devflow init --reset` removes the stored level, and over a rejected manifest the summary names the level it removed, as in `(was full)`.
279
+ A bare `devflow gates --set` names the levels in its error, as `devflow init --gate-level` does.
280
+ - **A lint pack template, and a lean lint pack in Validate** ([#475](https://github.com/dean0x/devflow/issues/475)).
281
+ - The package ships a template in `templates/lint-pack/`: a script, an example config and a README.
282
+ You copy it into your repository and own the copy.
283
+ devflow does not install, update or run the template itself.
284
+ - At `lean`, Phase 6 of `/implement` has Validate run your root `lint-pack` script last, after the build, typecheck, lint and test commands pass.
285
+ Validate finds it as a `package.json` script, else as a `Makefile` target.
286
+ The script reads the lines the branch changed.
287
+ It finds a removed flag that a doc still names, a plan ID or a tombstone phrase in new text, and an oversized function (through your own linter).
288
+ A match fails validation and reaches Fix as a file and line reference.
289
+ - Fix does not edit the lint pack, its config, its build-file entry or any `.gitattributes` to clear a match.
290
+ Fix does not silence the linter to clear a match, with a disable comment or a linter-config change.
291
+ It reports the match under Blockers.
292
+ To clear a match that you judge false, add an allow glob to `.lint-pack.conf`, commit it, and ask `/implement` to re-validate.
293
+ - A pack error does not change the validation result.
294
+ A git older than 2.30, a config that the script cannot read, a linter that did not run and a run that a timeout stops are pack errors, never a clean run.
295
+ A pack error reads `UNVERIFIED` in the `/implement` final report and in the Testing part of the PR body.
296
+ The pack also prints a `pack-changed` line for a changed build-file line in the compared range that names `lint-pack` or `BASE`, a `pack-dirty` line for an uncommitted change to a pack file, and the base it compared.
297
+ Known limit: the pack prints the base it compared (`base <sha>`), but Validate does not check that base yet, and issue [#537](https://github.com/dean0x/devflow/issues/537) adds that check.
298
+ If the project has no `lint-pack` script or target, Validate prints one "not configured" line.
299
+ - The re-validation that you ask `/implement` for runs the pack.
300
+ The re-validation after QA fixes, `/resolve`, `/self-review`, `/release` and `/dynamic-build` do not run it, and no level below `lean` runs it.
301
+
302
+ ### Changed
303
+
304
+ - **`/implement` skips Harden at `lean` on a docs-only diff** ([#482](https://github.com/dean0x/devflow/issues/482)). At `lean`, `/implement` skips Phase 4 Harden when the diff is docs-only. The decision reads path names only. It reads no diff content and runs no detection script. Harden is skipped only when all of these hold: the compliance lens is exactly `off`; the branch diff list is not empty; no Code report names a deleted, renamed or moved path; and every changed path is the root `README.md`, the root `CHANGELOG.md` or a `.md` file under the root `docs/`. A path on that list has no segment that starts with a dot, no double quote in its name and no file name that agents load as instructions, in any letter case. No loaded instruction, rules or imported file names the path. A tests-only diff runs Harden. When the decision is unclear, Harden runs. The run report says `Harden: ran` or `Harden: SKIPPED (docs-only diff)` at `lean` only. `full` and `standard` do not change. When Harden runs, it reads the whole branch diff. `/code-review` security runs at every level. The README, the CLI reference and the command reference state the rule. Known limits at `lean` on a docs-only diff: stub and wiring detection does not run; the pitfall check of public text in README and CHANGELOG does not run; a path that only a not-yet-loaded instruction file, such as a nested one, names is not seen; and Harden does not review a delete or a rename that no Code report names ([#571](https://github.com/dean0x/devflow/issues/571)). The docs-only check reads path names. It does not look at symlinks, file-type changes, or docs files that a site generator compiles. Run `devflow gates --set standard` or `--set full` to keep Harden on every diff.
305
+ - **`/implement` and `/resolve` skip Polish at `standard` and `lean`** ([#481](https://github.com/dean0x/devflow/issues/481)).
306
+ - At `standard` and `lean`, `/implement` skips Phase 3 Polish, and `/resolve` skips Phase 6 Polish in each worktree at that level.
307
+ At `full`, both spawn Polish.
308
+ `/self-review`, `/debug` and `/dynamic-build` keep Polish at every level and read no level.
309
+ Harden still reads the whole branch diff, and Validate does not depend on Polish.
310
+ - The quality rule has one bullet that holds a subset of Polish's cleanup list: leftover debug statements, unused imports, unnecessary variables used once right after assignment, nested ternaries, checks the types enforce and catches around code that cannot throw.
311
+ The bullet cuts debug statements everywhere, but it keeps checks and catches at a trust boundary or a fail-closed path.
312
+ The Code agent applies it while it writes.
313
+ At `full` and `standard`, `/code-review` can report these items.
314
+ `devflow gates`, the `devflow init` level hints, the README, `docs/cli-reference.md` and `docs/commands.md` state the effect.
315
+ - Accepted risk: at `standard` and `lean`, no `/implement` agent grades naming and consistency, and Harden reports both as `SKIP (Polish agent)`.
316
+ No rule holds two other Polish items: language-behavior tests and verbose names.
317
+ Harden's test pillar partly covers language-behavior tests.
318
+ - At `standard` and `lean`, `/resolve` skips Polish and never spawns Harden, so debug statements in its fixes that hold no secret or token get no later pass beyond the quality rule and the review.
319
+ At `lean`, `/code-review` does not report the cleanup items.
320
+ Ticket [#568](https://github.com/dean0x/devflow/issues/568) tracks the Harden wording.
321
+ Run `devflow gates --set full` to keep Polish.
322
+ - **`/implement` and `/resolve` read the gate level** ([#480](https://github.com/dean0x/devflow/issues/480)).
323
+ - At `standard` and `lean`, each command reads its level reference one time for each run. At `full`, it reads no reference.
324
+ `/implement` reads it at the start of Phase 3.
325
+ `/resolve` reads it in Step 0d when any worktree is at `standard` or `lean`.
326
+ The references hold the phase rows, and the [#481](https://github.com/dean0x/devflow/issues/481) entry lists the rows that this release adds.
327
+ - The `/implement` report and the `/resolve` display name the level at every level.
328
+ `/resolve` also names it in `resolution-summary.md`.
329
+ `devflow gates` says that `/implement` and `/resolve` read the level.
330
+ - If a reference cannot be read, the command says `level reference unreadable: no level rows applied`.
331
+ It applies no row and keeps the level, so at `lean` the lint pack still runs.
332
+ - No level removes Validate, the CI gate, the evidence claims, the Verification Gate or the compliance directive.
333
+ No level changes the Triage security gate or the ESCALATED route.
334
+ - **Code, Fix and Refactor check the staged diff for secrets or tokens in logs or debug output before each commit** ([#584](https://github.com/dean0x/devflow/issues/584)).
335
+ - Each of these agents checks the staged diff of every file it commits.
336
+ The check runs at every level, wherever `/resolve`, `/implement`, `/debug`, `/dynamic-build` (and dynamic workflows that spawn them) or ambient mode spawn these agents.
337
+ Run `devflow init` to install the updated agents.
338
+ - **`/implement`, `/code-review`, `/bug-analysis` and `/resolve` check branch names against an allowed set** ([#495](https://github.com/dean0x/devflow/issues/495)).
339
+ - A base branch name outside the allowed set, or one that git refuses, stops the run. The message states the set.
340
+ In `/code-review` multi-worktree mode, a rejected base blocks only that worktree.
341
+ - An incremental `/code-review` or `/bug-analysis` run takes the full range when it cannot use the stored review head.
342
+ A failed patch write in `/code-review` stops the run.
343
+
344
+ ### Fixed
345
+
346
+ - **`/implement`, `/code-review`, `/bug-analysis` and `/resolve` use a fresh base for branch diffs** ([#495](https://github.com/dean0x/devflow/issues/495)).
347
+ - A new script, `resolve-base.cjs`, makes at most one fetch of the base branch, picks the base by one stated rule and prints one status line.
348
+ The fetch updates only the remote-tracking ref of the base branch, and credential prompts are off for it.
349
+ The branch diff starts at the fork point of that base and `HEAD`.
350
+ - The fetch stops after 45 seconds, each local git call stops after 30 seconds, and one run has a budget of 100 seconds.
351
+ A local git call that gives no answer reports `resolver-unavailable`.
352
+ A normal `/implement` run fetches the base branch once, and a re-validation that you ask for can add one more fetch.
353
+ - When the fetch fails or times out, `/implement`, `/code-review` and `/bug-analysis` use the best base they have and print a warning.
354
+ Known limit: `/resolve` uses that base without a warning.
355
+ - When no usable base exists, for example in a shallow clone without the base history, `/implement` stops, and `/code-review` and `/bug-analysis` stop on a full-range run.
356
+ Each names the cause and a fix.
357
+ `/resolve` takes its branch diff from the Git agent's `validate-branch`, which returns BLOCKED in that case.
358
+ - Run `devflow init` after you update, to install the script and the updated commands.
359
+ - **SessionStart loads the current working memory once** ([#591](https://github.com/dean0x/devflow/issues/591)).
360
+ - It does not load pre-compaction memory snapshots, also when a snapshot is newer or the current memory is missing.
361
+ - SessionStart does not delete or move the existing `backup.json` file. The next PreCompact writes it again with Git state only.
362
+
363
+ ---
364
+
365
+ ## [3.7.0] - 2026-10-16
366
+
367
+ ### Upgrade notes — Gate level
368
+
369
+ The settings line has a new last field for the gate level ([#472](https://github.com/dean0x/devflow/issues/472)).
370
+ Do the step below after you update.
371
+
372
+ **What you must do:**
373
+ - Run `devflow init` after you update. A full init installs the commands that accept the new settings line.
374
+ - After `devflow init`, a user with no level gets `standard` in `/code-review`: no TypeScript focus, and no Dependencies focus on a code diff that changes no dependency manifest. Run `devflow gates --set full` to keep today's set.
375
+ - A user with no level also gets the lean `/plan`: fewer agents, while the security gap analysis and the design review still run. Run `devflow gates --set full` to keep the full `/plan`.
376
+
377
+ **Stale-install window:**
378
+ - The settings line now ends with `GATE_LEVEL=<full|standard|lean>`. An installed command from an
379
+ older version accepts only the old fields, so it does not accept the longer line.
380
+ - `devflow init --hud-only` and a plugin-only update refresh the resolver script. They do not
381
+ refresh the installed prompts.
382
+ - Until you run a full `devflow init`, every installed command uses its fail-closed settings value.
383
+ - Until you run `devflow init`, the installed `/code-review` and `/plan` ignore the level.
384
+
385
+ **Known limits:**
386
+ - A corrupt manifest, or one over 1 MiB, reads as the `standard` level. `devflow gates --status`
387
+ warns that `devflow init` will replace the file.
388
+ - `devflow init` still overwrites a corrupt or rejected manifest. The stored level is lost with it.
389
+ - Two commands that write the manifest at the same moment can lose one update.
390
+ - There is no team floor. A repository that declares compliance can run a lower personal level.
391
+ `/code-review` and `/plan` read the level, so a personal `lean` level narrows the review and the
392
+ planning run even where compliance is declared. The Compliance focus still runs on its trigger,
393
+ and in `/plan` the security gap focus and the design review run at every level.
394
+ Issue [#488](https://github.com/dean0x/devflow/issues/488) (the compliance lens as a floor on
395
+ the level) is open.
396
+
397
+ ### Upgrade notes — Working memory
398
+
399
+ The memory worker's write is limited to its staged file. Read the items below after you update.
400
+
401
+ **What you must do:**
402
+ - Update Claude Code to 2.1.269 or newer. On an older version, working memory does not update and Claude Code shows no message. The worker log has one line that says why.
403
+ - If a worker `env` value lives only in your project or local Claude Code settings, move it to your user settings file. The worker loads only the user settings.
404
+
405
+ **Your own settings:**
406
+ - Allow rules in your own Claude Code settings also apply to the worker's run. A user-level Edit allow rule that covers other paths covers the worker too.
407
+
408
+ **Known limits:**
409
+ - A project path that contains any of `* ? [ ] \ " { }` or a control character gets no working-memory updates. The permission rule carries the path without quoting. The worker skips the project, logs the reason and shows one message at session start. Parentheses and spaces in the path are carried as they are.
410
+
411
+ ### Added
412
+
413
+ - **A gate level on the settings line, and the `devflow gates` command** ([#472](https://github.com/dean0x/devflow/issues/472)). The settings line ends with `GATE_LEVEL=<full|standard|lean>`. The level comes from a personal `gateLevel` key in `.devflow/config.json`, then from the machine default `features.gateLevel` in `~/.devflow/manifest.json`, then from `standard`. The personal key may raise or lower the level. It is not a narrow-only switch, and a later change can make it narrow-only. A `gateLevel` in `project.json` is ignored, and no command writes the personal key. A malformed value reads as `full`. `devflow gates --set <level>` writes the machine default and nothing else. `devflow gates --status` shows the level in effect, the layer that decided it and the machine default. `/code-review` reads the level ([#474](https://github.com/dean0x/devflow/issues/474)) and so does `/plan` ([#473](https://github.com/dean0x/devflow/issues/473)); [#480](https://github.com/dean0x/devflow/issues/480) adds more readers.
414
+ - **`devflow init --hud-only` prints a line when the installed prompts come from another devflow version** ([#472](https://github.com/dean0x/devflow/issues/472)). It tells you to run `devflow init`.
415
+ - **A message at session start when working memory stops for a cause you can fix.** If the worker cannot write its staged file at the project path (for example, a path with a character the permission rule cannot carry), or Claude Code refuses the worker's write in two runs with no successful update between them, the next session start shows one message that points to the log. Each cause is shown once.
416
+
417
+ ### Changed
418
+
419
+ - **`/code-review` picks its focus set by gate level** ([#474](https://github.com/dean0x/devflow/issues/474)). `full` runs every focus, as before. `standard`, the default, drops TypeScript, and drops Dependencies on a code diff that changes no dependency manifest (a lockfile alone does not count). `lean` runs Security, Testing and Reliability on a code diff. The Compliance focus keeps its own trigger at every level. A docs-only, tests-only or lockfile-only diff keeps its reduced set, and at `lean` a tests-only diff drops Consistency. A mixed non-code diff runs the union of its classes' sets. Security runs at every level and in every class. `/code-review` reads a new level reference only at `standard` or `lean`. If it cannot read the reference, it says so and runs the full sets. The review summary now shows the gate level and the focuses, and a review with no security report gives CHANGES REQUESTED.
420
+ - **`/plan` runs a lean shape at `standard` and `lean`** ([#473](https://github.com/dean0x/devflow/issues/473)). `full` runs the phases as before. `standard`, the default, and `lean` run one Explore round of two agents (three for several issues), or none when a `/research` report from the same conversation covers the scope; no Synthesize step; two gap-analysis agents, one for security and one for completeness, architecture and performance (plus consistency and dependencies for several issues); one Plan agent; and the design review. The security gap agent and the design review run at every level, the Compliance agent keeps its own trigger, and Gates 0, 1 and 2 run at every level. Every agent spawn in `/plan` names its agent type; the planning spawns use Claude Code's built-in `Plan` agent. If `/plan` cannot read its level reference, it says so and runs the full shape. The run report names the gate level. Run `devflow gates --set full` to keep the full shape.
421
+ - **`/implement` splits long plans into sequential Code phases; a run with no plan stays single** ([#452](https://github.com/dean0x/devflow/issues/452)).
422
+ - **Code agents read large files once, by range, and cap printed output** ([#452](https://github.com/dean0x/devflow/issues/452)).
423
+ - **Polish, Harden, Evaluate and Test get the full branch diff as `FILES_CHANGED`** ([#452](https://github.com/dean0x/devflow/issues/452)).
424
+ - **`/implement` stops when the base branch name has a character outside ASCII letters, digits and `._/+@,#-`, or is longer than 200** ([#452](https://github.com/dean0x/devflow/issues/452)). The check also covers the re-validation path. Git accepts some refused names, such as `café`. For them, `/implement` stops and tells the user which characters are allowed.
425
+ - **The token audit counts files written through Bash** ([#442](https://github.com/dean0x/devflow/issues/442)).
426
+ - **The memory worker's write is limited to its staged file.** The `claude -p` run loads only your own Claude Code settings plus two permission rules, an allow rule for `.devflow/memory/WORKING-MEMORY.md.new` and a deny rule for every path under it, and a permission mode that refuses every call that no allow rule covers. Allow rules in your own Claude Code settings also apply to the run, so a user-level Edit allow rule that covers other paths covers the worker too. A folder or a link at the staged path is removed by one guarded delete of exactly that path; when it cannot be removed, the run fails and removes nothing. The worker ignores a project's or a local Claude Code settings file.
427
+ - **Working memory needs Claude Code 2.1.269 or newer.** `devflow init` states the version at its working-memory step. On an older Claude Code the worker does not run, keeps the queue and writes one log line that says why, so working memory does not update until you update Claude Code.
428
+ - **The memory log gets one `Run:` line for each worker run.** `.background-memory-update.log` under `~/.devflow/logs/`, in the folder for the session that ran the worker (`<session-directory-slug>`), ends every run with `Run: cli=<version|unknown> argv=<lean|legacy|none> result=<updated|conflict|failed|skip|below-floor> denials=<count|unknown|n/a> removed=<none|dir|link>`. `cli=unknown` means the worker read no version, `denials=unknown` means the result reported no count, and `denials=n/a` means no run started. A below-floor line adds `floor=<version>`. The line holds keywords and digits only, never turn or prompt text.
429
+ - **A project inside a `.git` folder gets no working-memory update.** The worker skips it, logs the reason and shows the path message once at session start. A checkout under `.claude/worktrees` is updated like any other checkout.
430
+ - **PR links and `/dynamic-build` ticket branches follow stricter rules** ([#486](https://github.com/dean0x/devflow/issues/486)). `/implement` prints `TRACEABILITY: DEGRADED (ambiguous issue reference)` when it has an issue number and no link line. `/code-review` and `/bug-analysis` PRs no longer get a closing line from the branch name. A PR body has no `## Related Issues` heading when neither an issue number nor a link line is given. In a `/dynamic-build` wave, the ticket branch must be a local branch name that passes the allowlist. A name with a leading `#` or `-`, a revision name such as `HEAD`, a tag and a SHA are all refused, and the ticket is quarantined. The wave aborts the merge only when the merge began. On Jira and Linear, the PR link line always uses the default reference form (`Refs {KEY}-{n}`). A custom `## Reference Rendering` section no longer shapes that line. It still shapes the release Shipped Issues section. Follow-up [#511](https://github.com/dean0x/devflow/issues/511) tracks applying it to the PR link line.
431
+
432
+ ### Fixed
433
+
434
+ - **Prompts resolve the Claude config directory with the same rule as the installer** ([#517](https://github.com/dean0x/devflow/pull/517)). `CLAUDE_CONFIG_DIR` applies when it is an absolute path, else `~/.claude`.
435
+ - **A tracked `.devflow/config.json` no longer applies as personal config** ([#489](https://github.com/dean0x/devflow/pull/489)). devflow ignores it and shows a warning.
436
+ - **`/dynamic-build` wave merges are safer, and a supplied PR link line is used as given** ([#486](https://github.com/dean0x/devflow/issues/486)). A wave merge uses `git merge --no-ff` and records the pre-merge SHA. The ticket branch name is checked before the merge, and a refused name quarantines that ticket. The wave halts when the merge or base SHA is not valid. A ticket whose branch adds no commit stops the wave before the post-merge build, and no wave PR opens. A merge whose post-merge build fails is undone by a reset to the recorded SHA. The run summary names why the wave halted. A PR gets no closing reference from a bare number or the branch name.
437
+ - **Model discovery waits up to 6 s for the routing runtime** ([#519](https://github.com/dean0x/devflow/pull/519)). The wait was 2 s. On a loaded machine, the first start of node with the routing runtime can take more than 2 s. The agents TUI then reported an installed runtime as unknown. `devflow proxy --enable` then did not refresh the model cache. A runtime that does not answer within 6 s still falls back to the stale cache.
438
+ - **The memory worker keeps the queue when it finds neither jq nor node** ([#523](https://github.com/dean0x/devflow/issues/523)). The hooks that start the worker already stop without a parser. A worker that ran with a different PATH deleted the queued turns. Now the worker stops before it reads the queue, and the queue stays for the next run. A parser that exits with an error also leaves the queue and the batch in place, and a queue that cannot be added to a leftover batch stays in its file.
439
+ - **A malformed queue line no longer stops the worker from reading the other lines** ([#528](https://github.com/dean0x/devflow/issues/528)). With jq, the worker read the queue as one stream, so one malformed line stopped the parse. The valid turns after it were lost, or the whole batch was deleted. Now the worker reads each line alone, skips only the malformed line, and logs how many lines in the read window it skipped. A row cut off before its line break runs into the next row, so those two rows are one malformed line. Both parsers read a line as a turn only when its role is user, assistant or qa, so jq and node log the same skip count. A batch with no readable line is still removed.
440
+
441
+ ---
442
+
8
443
  ## [3.6.0] - 2026-10-14
9
444
 
10
445
  ### Upgrade notes — Agent rename (6 agents)
@@ -1673,7 +2108,9 @@ devflow init
1673
2108
 
1674
2109
  ---
1675
2110
 
1676
- [Unreleased]: https://github.com/dean0x/devflow/compare/v2.0.0...HEAD
2111
+ [Unreleased]: https://github.com/dean0x/devflow/compare/v3.8.0...HEAD
2112
+ [3.8.0]: https://github.com/dean0x/devflow/compare/v3.7.0...v3.8.0
2113
+ [3.7.0]: https://github.com/dean0x/devflow/compare/v3.6.0...v3.7.0
1677
2114
  [3.6.0]: https://github.com/dean0x/devflow/compare/v3.5.0...v3.6.0
1678
2115
  [3.5.0]: https://github.com/dean0x/devflow/compare/v3.4.0...v3.5.0
1679
2116
  [3.4.0]: https://github.com/dean0x/devflow/compare/v3.3.0...v3.4.0
package/README.md CHANGED
@@ -30,7 +30,7 @@ you: /implement (hand it the plan)
30
30
 
31
31
  Git branch feat/42-rate-limit-upload
32
32
  Code implements the plan — your learned decisions, pitfalls, and feature knowledge preloaded
33
- Polish · Harden cleanup pass, then 9-pillar quality gate
33
+ Polish · Harden cleanup pass at full, then 9-pillar quality gate (lean: not on docs-only diffs)
34
34
  Evaluate implementation matches the original request ✓
35
35
  Validate build ✓ typecheck ✓ lint ✓ tests ✓
36
36
  Test 5/5 QA scenarios pass
@@ -56,11 +56,11 @@ This is the **orchestrated flow** — you stay in the loop between every step. W
56
56
 
57
57
  **A staffed agent roster.** 20 specialized agents with explicit model assignments — Opus for analysis, Sonnet for execution, Haiku for I/O. Reassign any agent's model with `devflow agents`, including GPT models through external model routing (`devflow proxy`).
58
58
 
59
- **Up to 20 parallel Review agents.** Security, architecture, performance, complexity, consistency, regression, testing, and more. Each produces findings with severity, confidence scoring, and concrete fixes. Conditional Review agents activate when relevant (TypeScript for `.ts` files, database for schema changes, compliance when regulated surface detected in the diff). Every finding gets validated and resolved automatically.
59
+ **Up to 20 parallel Review agents.** Security, architecture, performance, complexity, consistency, regression, testing, and more. Each produces findings with severity, confidence scoring, and concrete fixes. Conditional Review agents activate when relevant (language focuses such as TypeScript for `.ts` files, database for schema changes, compliance when regulated surface detected in the diff). The gate level narrows these sets: the default `standard` level drops the TypeScript focus, and `lean` runs fewer focuses still. Every finding gets validated and resolved automatically.
60
60
 
61
61
  **Memory that persists.** Session context survives restarts, `/clear`, and context compaction. Your agent picks up exactly where it left off.
62
62
 
63
- **Self learning.** A background agent detects architectural decisions and known pitfalls from your session dialogs and writes them to `.devflow/learning/decisions.md` and `.devflow/learning/pitfalls.md` — informing every future review and implementation session without any manual bookkeeping.
63
+ **Decisions and pitfalls.** A background agent detects architectural decisions and known pitfalls from your session dialogs and writes them to `.devflow/curation/decisions.md` and `.devflow/curation/pitfalls.md` — informing every future review and implementation session without any manual bookkeeping.
64
64
 
65
65
  **Feature knowledge bases.** Curated `KNOWLEDGE.md` files per feature area — patterns, conventions, and gotchas — git-tracked and shared with your team. Planning, implementation, and review workflows load them automatically and refresh them after changes.
66
66
 
@@ -128,14 +128,14 @@ Graph runs trade tokens for autonomy: you make your calls at each wave's decisio
128
128
  npx devflow-kit init
129
129
  ```
130
130
 
131
- That's it. The interactive wizard offers Recommended defaults or an Advanced flow — plugin selection, feature configuration, compliance frameworks, and security settings. Ambient mode, working memory, and learning are on by default. Non-interactive: `npx devflow-kit init --recommended`.
131
+ That's it. The interactive wizard offers Recommended defaults or an Advanced flow — plugin selection, feature configuration, compliance frameworks, the gate level, and security settings. Ambient mode, working memory, and curation are on by default. Non-interactive: `npx devflow-kit init --recommended`.
132
132
 
133
133
  ## Privacy & Sharing
134
134
 
135
135
  Everything Devflow generates lives under `.devflow/` — working memory, decisions and pitfalls, feature knowledge bases, naming conventions, docs and transient locks. On first use Devflow appends one block to your project's root `.gitignore`. It keeps per-developer runtime state on your machine and shares three things through git: the feature knowledge bases, the learned naming conventions and the team's settings in `.devflow/project.json`, which carry its [evidence policy](#evidence-policy):
136
136
 
137
137
  ```gitignore
138
- # Devflow runtime data — local by default (memory, learning, docs, locks).
138
+ # Devflow runtime data — local by default (memory, curation, docs, locks).
139
139
  # Shared via git: feature knowledge bases under .devflow/features/ (index.md and
140
140
  # every {slug}/KNOWLEDGE.md), .devflow/conventions.md (naming authority),
141
141
  # .devflow/policy.json (retired; presence only) and .devflow/project.json (team settings).
@@ -188,19 +188,21 @@ A repository can commit `.devflow/project.json` to settle team-wide choices. Eve
188
188
  ```json
189
189
  {"version":1,"evidence":"required","compliance":["hipaa"],
190
190
  "tracker":{"provider":"jira","site":"https://acme.atlassian.net","key":"ACME"},
191
- "reviewPublication":"auto","features":{"learning":false}}
191
+ "reviewPublication":"auto","features":{"curation":false}}
192
192
  ```
193
193
 
194
194
  - `evidence` is the [evidence policy](#evidence-policy); `compliance` names the regulatory frameworks the repository answers to, and its presence raises the evidence floor to `required`.
195
195
  - `tracker` selects the repository's issue tracker. Your personal `.devflow/config.json` may only narrow it, to `github` or to the same provider.
196
196
  - `reviewPublication` is a ceiling only: it can lower your personal value, never raise it. With no personal value you get at most `auto` — a team `off` still lowers it — so a branch that commits `full` cannot switch off the visibility gate for whoever reviews it.
197
- - `features` can switch memory, learning or knowledge off for this repository, never back on. Your personal `config.json` can do the same for you.
197
+ - `features` can switch memory, curation or knowledge off for this repository, never back on. Your personal `config.json` can do the same for you. The key is `features.curation`. Devflow 3.8 reads the old key `features.learning` too, and the repository turns the feature off when either key is `false`. A 3.7 install reads only `features.learning`. In a team with mixed versions, keep the old key in the committed file, or set both keys, until every member runs 3.8.
198
198
 
199
199
  **Adopting it.** Commit `project.json` on the default branch. `evidence` is always read from the default branch, so a feature branch cannot lower the bar it is judged by. Every other key — `tracker` with its `site` and `key`, `features` and the `reviewPublication` ceiling — is read from the branch you have checked out, so a branch that edits them sees the change at once. `compliance` is read from both and joined with your machine's frameworks: a branch can add a framework, never remove one, so a pull request that deletes `"compliance":["hipaa"]` is still reviewed under HIPAA. The default branch's copy is read from your clone's tracking branch, as fresh as your last fetch, never over the network, so a framework added on the default branch reaches the lens once your checkout has fetched it.
200
200
 
201
- Each key is checked on its own, so one bad value never disables the rest: a bad `evidence` resolves to `required`, a bad `reviewPublication` to `off`, a bad `compliance` list to the generic lens. A `project.json` or `config.json` that exists but is not a JSON object is never read as absent: the settings fail closed (publication off, knowledge write-back off, the tracker reported as invalid). The compliance lens is the exception, because it only adds scrutiny: it keeps every framework a readable layer declares, and an unreadable `project.json` counts as the generic lens. Memory and learning capture fail open instead: the hooks read an unreadable file as narrowing nothing, so capture runs as your machine's switch says.
201
+ Each key is checked on its own, so one bad value never disables the rest: a bad `evidence` resolves to `required`, a bad `reviewPublication` to `off`, a bad `compliance` list to the generic lens. A `project.json` or `config.json` that exists but is not a JSON object is never read as absent: the settings fail closed (publication off, knowledge write-back off, the tracker reported as invalid). The compliance lens is the exception, because it only adds scrutiny: it keeps every framework a readable layer declares, and an unreadable `project.json` counts as the generic lens. Memory and curation capture fail open instead: the hooks read an unreadable file as narrowing nothing, so capture runs as your machine's switch says.
202
202
 
203
- `config.json` is personal, so it must not be committed. A `config.json` that git tracks is ignored as if it were absent — otherwise a branch could commit `"reviewPublication":"full"` for whoever reviews it — and `devflow tracker|memory|learning|knowledge --status` say so, with the fix: `git rm --cached .devflow/config.json`. Commands never read the file themselves — one local resolver folds it with your `config.json` and the machine settings, without touching the network.
203
+ `config.json` is personal, so it must not be committed. A `config.json` that git tracks is ignored as if it were absent — otherwise a branch could commit `"reviewPublication":"full"` for whoever reviews it — and `devflow tracker|memory|curation|knowledge|gates --status` say so, with the fix: untrack the tracked entry with `git rm --cached`, then check or delete the file, because untracking leaves the committed bytes on disk as your personal file. Commands never read the file themselves — one local resolver folds it with your `config.json` and the machine settings, without touching the network.
204
+
205
+ **Gate level.** The gate level (`full`, `standard` or `lean`) is not a narrow-only switch: your personal `.devflow/config.json` may carry a top-level `"gateLevel"` key that raises or lowers the machine default, which sits in `~/.devflow/manifest.json`, and `standard` applies when neither is set. `devflow init` asks for the machine default (an interactive run only; `devflow init --gate-level <full|standard|lean>` sets it with no prompt, and `--recommended` or a non-interactive init keeps the stored value), and `devflow gates --set <level>` changes it later. A `gateLevel` in `project.json` is ignored, and no command writes the personal key. A malformed value reads as `full`. `/code-review` and `/plan` read the level: `standard` and `lean` run fewer review focuses and fewer planning agents. The security checks and, in `/plan`, the design review run at every level. The compliance gap agent runs on its own trigger at every level. At `lean` and at no other level, `/implement` has Validate run your project's `lint-pack` script last (template in `templates/lint-pack/`). The script finds the faults a linter does not, such as a removed flag that a doc still names. To clear a match that you accept, add an allow glob to `.lint-pack.conf`. Run `devflow gates --set full` to keep the full `/plan` shape and Polish. `/implement` and `/resolve` also read the level and name it in their report. At `standard` and `lean` they skip Polish, and `full` keeps it. At `lean`, `/implement` also skips Harden on a docs-only diff (the root `README.md`, the root `CHANGELOG.md` or `.md` files under the root `docs/` that no agent loads as instructions, with the compliance lens `off`), and its report says `Harden: ran` or `Harden: SKIPPED (docs-only diff)`. Run `devflow gates --set standard` or `--set full` to keep Harden on every diff. A level reference that cannot be read applies no row and keeps the level. After updating, run `devflow init`. See the [CLI reference](https://github.com/dean0x/devflow/blob/main/docs/cli-reference.md#gate-level).
204
206
 
205
207
  ## Evidence policy
206
208
 
@@ -280,12 +282,14 @@ For deep dives: [Working Memory](https://github.com/dean0x/devflow/blob/main/doc
280
282
  npx devflow-kit init # Install (interactive wizard)
281
283
  npx devflow-kit init --plugin=implement # Install specific plugin
282
284
  npx devflow-kit ambient --enable # Toggle ambient mode (orchestrator)
283
- npx devflow-kit learning --enable # Toggle decision/pitfall tracking (all projects)
285
+ npx devflow-kit curation --enable # Toggle decision/pitfall tracking (all projects)
284
286
  npx devflow-kit compliance --enable # Enable compliance (pick frameworks); prints the keys to add to .devflow/project.json
285
287
  npx devflow-kit compliance --status # Show compliance state and this repo's evidence policy
286
288
  npx devflow-kit tracker --set jira # Pick the machine's default tracker (github | jira | linear)
287
289
  npx devflow-kit tracker --status # Show provider, this repo's effective one, learned conventions, mechanics
288
290
  npx devflow-kit tracker --servers default # Tracker servers the agents may call (comma-separated names, or default)
291
+ npx devflow-kit gates --set lean # Set the machine's default gate level (full | standard | lean)
292
+ npx devflow-kit gates --status # Show the gate level in effect here and which layer decided it
289
293
  npx devflow-kit rules --status # Show installed rules
290
294
  npx devflow-kit security --status # Show / manage the security deny list
291
295
  npx devflow-kit safe-delete --enable # Install rm -> trash safe-delete
@@ -303,7 +307,7 @@ See [docs/cli-reference.md](https://github.com/dean0x/devflow/blob/main/docs/cli
303
307
  | Tool | Role | What It Does |
304
308
  |------|------|-------------|
305
309
  | **[Skim](https://github.com/dean0x/skim)** | Context Optimization | Code-aware AST parsing, command rewriting, output compression |
306
- | **Devflow** | Meta-Harness | Orchestrated + graph workflows, parallel review, memory, self-learning |
310
+ | **Devflow** | Meta-Harness | Orchestrated + graph workflows, parallel review, memory, curated decisions |
307
311
  | **[MDS](https://github.com/dean0x/mdscript)** | Prompt Engineering | Composable template language for prompts — variables, loops, conditionals, imports, compiled to clean Markdown |
308
312
 
309
313
  ## Building from Source