feat(memory): toggleable hooks + structured working memory#72
Open
feat(memory): toggleable hooks + structured working memory#72
Conversation
added 2 commits
March 1, 2026 19:10
…apshots - Add ## Progress section (Done/Remaining/Blockers) to working memory template - Require date and status on ## Decisions entries (YYYY-MM-DD [ACTIVE|SUPERSEDED]) - Raise line limit 100 → 120 to accommodate new section - Cap patterns.md at 40 entries with consolidation instruction - Snapshot WORKING-MEMORY.md into pre-compact backup JSON - Inject pre-compact snapshot in SessionStart when fresher than working memory - Backward compatible: old backups without memory_snapshot field gracefully ignored
…rantee Add `devflow memory --enable/--disable/--status` CLI command and `devflow init --memory/--no-memory` flags for user-controlled memory hook management. Memory defaults to enabled (foundational feature). Three hooks managed as a group (Stop, SessionStart, PreCompact) with partial-state detection (e.g., "enabled (2/3 hooks)"). Uninstall removes memory hooks before blanket hook prompt. Fix: ensure .docs/ exists when memory is enabled during init, since all 3 hooks silently exit without it. Previously user-scope installs never got .docs/, making memory hooks no-ops. 25 new tests (22 in memory.test.ts + 3 re-export tests). 162/162 pass.
Replace vague "proportional quality enforcement" with concrete description: "auto-loads relevant skills based on each prompt". More intuitive for users encountering the feature for the first time via `devflow list`. Updated across: CLI option/prompt, plugin descriptions, README, CLAUDE.md, marketplace.json, ambient plugin files, skill description, and hook script.
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
devflow memoryCLI command —--enable/--disable/--statusto toggle all 3 working memory hooks (Stop, SessionStart, PreCompact) as a group, with partial-state detection (e.g., "enabled (2/3 hooks)")devflow init --memory/--no-memoryflags — interactive prompt defaults to ON (foundational feature); non-TTY defaults to enabled## Now,## Progress,## Decisions,## Modified Files,## Context,## Session Logsections; SessionStart injects pre-compact snapshots when compaction happened mid-session.docs/dependency guarantee —initnow ensures.docs/exists when memory is enabled, since all 3 hooks silently exit without it (previously user-scope installs never got.docs/, making hooks no-ops)Test plan
npm run build— 26 skills, 9 pluginsnpm test— 162/162 pass (137 existing + 25 new)node dist/cli.js init(TTY) — memory prompt appears with default YES.docs/created after init with memory enabled (both user and local scope)node dist/cli.js init --no-memory— no.docs/creation from memory pathnode dist/cli.js memory --status— shows "enabled (3/3 hooks)"devflow memory --disablethen--enable— idempotent cycle works