Skip to content

feat(memory): working memory system enhancements#72

Merged
dean0x merged 6 commits intomainfrom
feat/memory-enhancements
Mar 3, 2026
Merged

feat(memory): working memory system enhancements#72
dean0x merged 6 commits intomainfrom
feat/memory-enhancements

Conversation

@dean0x
Copy link
Owner

@dean0x dean0x commented Mar 1, 2026

Summary

  • Structured working memory with auto-maintained sections (Now, Progress, Decisions, Modified Files, Context, Session Log) across Stop, SessionStart, and PreCompact hooks
  • Toggleable memory hooks via devflow memory --enable/--disable/--status and devflow init --memory/--no-memory
  • .docs/.memory/ migration — separates session state from review artifacts, with no-clobber migration and ephemeral cleanup
  • Tightened background agent permissions--tools "Write" + --allowedTools replaces --dangerously-skip-permissions
  • Auto-gitignore — hooks auto-add .memory/ and .docs/ to .gitignore on first run via marker file gate (~1μs skip after setup)
  • Ambient mode description clarification — "auto-loads relevant skills" replaces technical jargon

Changes

6 commits across 24 files (+913 / -76):

  • 4 hook scripts updated (stop, session-start, pre-compact, background updater) + 1 new helper (ensure-memory-gitignore.sh)
  • CLI: new memory command, updated init/uninstall with migration utilities
  • Tests: 6 new migration tests, all 168 pass
  • Docs: CLAUDE.md, README.md, file-organization, docs-framework skill updated

Test plan

  • npm run build — 26 skills, 9 plugins
  • npm test — 168/168 pass, no regressions
  • Hook verification: no --dangerously-skip-permissions remains; --allowedTools confirmed
  • Path verification: all .docs/ memory paths migrated to .memory/
  • Manual: remove .memory/ → start session → verify .memory/ recreated, .gitignore updated, marker file created
  • Manual: start second session → verify marker skips gitignore check

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
Dean Sharon added 4 commits March 2, 2026 00:31
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.
…t permissions

Move memory files to dedicated .memory/ directory, separating memory
lifecycle from documentation artifacts. Replace --dangerously-skip-permissions
with --tools "Write" --allowedTools restricted to exactly two files.

- Hook scripts: all 4 updated (.docs/ → .memory/, patterns.md → PROJECT-PATTERNS.md)
- CLI: add createMemoryDir() + migrateMemoryFiles() with per-project migration
- CLI: init/memory --enable create .memory/ and migrate existing files
- CLI: uninstall adds .memory/ cleanup (respects --keep-docs)
- CLI: .gitignore now includes .memory/
- Tests: 6 new migration tests (168/168 passing)
- Docs: CLAUDE.md, README, file-organization, docs-framework updated
Stop and PreCompact hooks now mkdir -p .memory/ instead of bailing
when the directory doesn't exist. SessionStart already guards on the
memory file itself. Removes the need to run devflow init per-project.
…k run

Extract shared ensure-memory-gitignore.sh helper sourced by stop and
pre-compact hooks. Uses a marker file (.memory/.gitignore-configured)
to gate a single stat check per session — skips entirely after first
run. Also adds .docs/ to the CLI's updateGitignore() entries.
@dean0x dean0x changed the title feat(memory): toggleable hooks + structured working memory feat(memory): working memory system enhancements Mar 3, 2026
@dean0x dean0x merged commit 38da9e8 into main Mar 3, 2026
4 checks passed
@dean0x dean0x deleted the feat/memory-enhancements branch March 3, 2026 22:31
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