feat!: ignore .devflow/ wholesale at repo root (clean break, drop nested allowlist)#245
Merged
Merged
Conversation
…ted allowlist) Replace the nested .devflow/.gitignore "ignore-everything-then-re-include decisions/features" policy with a single .devflow/ entry in the project's root .gitignore. The whole runtime folder is now ignored by default; sharing .devflow/ content (decisions, knowledge bases) becomes opt-in. The ensure-devflow-init hook is the live, every-project mechanism: it now appends .devflow/ to the root .gitignore (creating the file if absent, idempotent) and writes a new .root-gitignore-configured marker so projects set up under the old model are retrofitted lazily on the next session. No migration sweep — clean break for v2. - project-paths.ts/.cjs: getGitignoreEntries() now includes .devflow/; removed getDevflowGitignoreContent() - migrations.ts: removed sync-devflow-gitignore v1/v2/v3 migrations and the Step-5 nested-gitignore creator; stop stripping .devflow/ from the root .gitignore during consolidation - ensure-devflow-init: write the root .gitignore instead of the nested allowlist - tests: updated project-paths, migrations, shell-hooks, eager-memory-refresh (S9), and decisions-ledger to the wholesale-ignore model - repo: untracked .devflow/ (git rm --cached) and added .devflow/ to the root .gitignore - docs: CLAUDE.md reflects the new policy BREAKING CHANGE: .devflow/ is gitignored by default. Projects that previously committed decisions/feature-knowledge under .devflow/ keep those files tracked (git honors existing tracking), but new .devflow/ content will not be tracked. Remove the .devflow/ entry from .gitignore to opt back into sharing.
…am-commit) Follow-up to the .devflow/ wholesale-ignore change (PR #245), closing gaps surfaced in self-review. Decouple the root .gitignore write from the memory toggle (PF-014). Extract a single-source ensure-root-gitignore helper; ensure-devflow-init sources it, and the always-on session-start-context sources it too — so memory-off projects (decisions/knowledge only) still get .devflow/ ignored. Add deterministic init-time ensureDevflowGitignore (appends only .devflow/, never .claude/), called unconditionally when a git root exists. Remove dead dream-commit machinery: the helper auto-committed .devflow/ artifacts via 'git add' (no -f), a permanent no-op under wholesale ignore (ADR-021). Delete the script and its three skill Auto-commit sections, and drop the now-orphaned autoCommit dream-config field plus its misleading 'decisions --status' line. Add purge-orphaned-dream-commit-hook-v1 global migration (the installer copies scripts/ additively, so the orphan would otherwise linger on existing machines). Fix stale 'committed to git' comments (migrations.ts ADR-012, init.ts features/) now that .devflow/ is gitignored by default. Document Privacy & Sharing (opt-in) in README. Tests: ensure-root-gitignore, memory-independent session-start-context, ensureDevflowGitignore, and the new migration. Full suite green (64 files / 1870).
…tted' ledger wording - CLAUDE.md: document the new global migration alongside purge-learning-global-v1. - migrations.ts: decisions-ledger-unify-v1 no longer calls the anchored ledger 'committed' — both the ledger and the raw observation log are gitignored under .devflow/ by default (ADR-021).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Simplifies how Devflow's
.devflow/runtime folder is git-tracked. Replaces the complex nested.devflow/.gitignore("ignore everything, then re-include decisions + feature knowledge") with a single.devflow/entry in the project's root.gitignore. The whole runtime folder is ignored by default; sharing its contents is now opt-in.Motivated by recurring friction — the selective re-include policy created conflicts and got in the way during normal work. Clean break for v2: no migration sweep.
What changed
New model — the
ensure-devflow-inithook is the live, every-project mechanism:.devflow/to the root.gitignore(creates the file if absent; idempotent grep guard).root-gitignore-configuredmarker (renamed from.gitignore-configured) so projects set up under the old model are retrofitted lazily on the next session — no migration neededRemoved the old nested-gitignore machinery:
getDevflowGitignoreContent()deleted (TS + CJS mirror)getGitignoreEntries()now returns['.claude/', '.devflow/']sync-devflow-gitignorev1/v2/v3 migrations and the consolidate migration's Step‑5 nested-gitignore creator.devflow/from the root.gitignoreThis repo: untracked
.devflow/(git rm --cached, 9 files) and added.devflow/to the root.gitignore. Working copies remain on disk (now ignored).Docs: CLAUDE.md updated — the "(committed to git)" annotations for
.devflow/features/anddecisions-ledger.jsonlnow read "gitignored by default".Behavioral note (breaking)
Because the hook fires every session, a project that was intentionally committing
.devflow/content (e.g. shared decisions/knowledge) will get.devflow/auto-added to its root.gitignore. Already-tracked files stay tracked (git honors existing tracking); only new.devflow/files become ignored. The appended line documents how to opt back in.Testing
tscclean; fullnpm run buildcleanFollow-up — gap fixes (commit
c8d41e5)Self-review of the change above surfaced gaps that this commit closes:
1. Memory-coupling bug (correctness). The only runtime writer of the root
.gitignoreentry —ensure-devflow-init— was reached only behind the memory-enabled gate in all three memory hooks. A project with memory OFF but decisions/knowledge ON never got.devflow/ignored (the deletedsync-devflow-gitignoremigrations used to cover this). Fixed by decoupling the write from any feature toggle:scripts/hooks/ensure-root-gitignorehelper (the marker fast-path + grep idempotency guard + create/append + comment line).ensure-devflow-initnow sources it (one implementation of the write).session-start-contextsources it too — this is the path that covers memory-off projects.ensureDevflowGitignore(appends only.devflow/, never.claude/), called unconditionally when a git root exists.2. Removed the dead
dream-commitmachinery. It auto-committed.devflow/artifacts viagit add(no-f) — a permanent no-op now that.devflow/is ignored wholesale. Deleted the 223-line script + its three skillAuto-commitsections, and dropped the now-orphanedautoCommitdream-config field plus its misleadingdevflow decisions --statusline. Added apurge-orphaned-dream-commit-hook-v1global migration — the installer copiesscripts/additively (copyDirectorynever deletes), so the orphaned hook would otherwise linger in every existing~/.devflow/scripts/hooks/.3. Stale "committed to git" comments fixed (
migrations.tsADR-012 → ADR-021 supersession;init.tsfeatures/).5. Opt-in guidance — a Privacy & Sharing section added to
README.md(gitignored by default; how to share everything or selectively re-includedecisions.md/pitfalls.md/KNOWLEDGE.md).Decisions captured this session: ADR-021 (reverse the sharing policy) and PF-014 (the gitignore/memory coupling).
Testing (follow-up): full suite green — 64 files, 1870 tests, exit 0 (deleted
dream-commit.test.ts; addedensure-root-gitignore, memory-independentsession-start-context,ensureDevflowGitignore, and the new migration).tsc+ fullnpm run buildclean.🤖 Generated with Claude Code