Skip to content

feat(memory): toggleable hooks + structured working memory#72

Open
dean0x wants to merge 3 commits intomainfrom
feat/memory-enhancements
Open

feat(memory): toggleable hooks + structured working memory#72
dean0x wants to merge 3 commits intomainfrom
feat/memory-enhancements

Conversation

@dean0x
Copy link
Owner

@dean0x dean0x commented Mar 1, 2026

Summary

  • New devflow memory CLI command--enable/--disable/--status to toggle all 3 working memory hooks (Stop, SessionStart, PreCompact) as a group, with partial-state detection (e.g., "enabled (2/3 hooks)")
  • New devflow init --memory/--no-memory flags — interactive prompt defaults to ON (foundational feature); non-TTY defaults to enabled
  • Structured WORKING-MEMORY.md — Stop hook now writes ## Now, ## Progress, ## Decisions, ## Modified Files, ## Context, ## Session Log sections; SessionStart injects pre-compact snapshots when compaction happened mid-session
  • Fix: .docs/ dependency guaranteeinit now 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)
  • Uninstall integration — memory hooks removed before blanket hook prompt (follows ambient pattern)

Test plan

  • npm run build — 26 skills, 9 plugins
  • npm 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 path
  • node dist/cli.js memory --status — shows "enabled (3/3 hooks)"
  • devflow memory --disable then --enable — idempotent cycle works
  • Ambient hook survives memory disable/enable cycle

Dean Sharon 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.
@dean0x dean0x changed the title feat(memory): structured decisions, progress tracking, pre-compact snapshots feat(memory): toggleable hooks + structured working memory Mar 1, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant