feat: add /solve (ticket to PR) and /memory (persistent session memory)#403
feat: add /solve (ticket to PR) and /memory (persistent session memory)#403johnbanr wants to merge 3 commits intogarrytan:mainfrom
Conversation
…t session memory) /solve TICKET-ID: chains fetch → investigate → code → review → test → ship from a single ticket ID. Supports Linear, Jira, and GitHub Issues. /memory: indexes patterns, fixes, and lessons from past sessions so future sessions compound. Integrates with /investigate (search before debugging), /review (check for anti-patterns), and /ship (auto-index after shipping). Storage: ~/.gstack/memory/ as markdown files (patterns.md, fixes.md, lessons.md, anti-patterns.md). Includes backfill from git history and quality filters to prevent indexing bad fixes.
Both skills now include the full preamble (update check, session tracking, telemetry, repo mode, lake intro, proactive config) matching the pattern used by /ship, /investigate, /review, and other existing skills.
Follow gstack convention: .tmpl files use {{PREAMBLE}} placeholder,
SKILL.md files are auto-generated with the standard preamble expanded.
Both skills include skill-specific preamble extensions (memory count,
pattern count) after the standard block.
|
Hey John! Really cool PR — I wanted to flag that I've been working on a related but different approach to the "sessions compound over time" problem: PR #405 ( Where /memory shines that /meditate doesn't:
Where /meditate takes a different approach:
I think these are complementary, not competing. /meditate provides repo-wide consciousness (the "body scan"), /memory provides structured recall of specific incidents (the "long-term memory"). The ideal v2 could have /meditate's conversation mining feed into /memory's structured storage — best of both. One technical note on /memory's storage: append-only markdown files (patterns.md, fixes.md) might get unwieldy at scale (500+ entries). JSON or JSONL with structured fields would make search/prune/dedup more reliable — the gstack codebase already uses this pattern extensively (analytics, eval-store, review logs). Would love to coordinate if both PRs land. Happy to make /meditate aware of /memory's files so it can incorporate bug patterns into the "Recurring Problems" section. |
|
Fair point — /meditate and /memory come at the same problem from different angles. The triage was an automated first pass, not a deep review of each PR. Happy to coordinate if both land. |
Summary
/solve TICKET-IDchains all existing skills into one command. Takes a Linear, Jira, or GitHub Issues ticket and runs the full loop: fetch ticket,/investigate(with memory search), code the fix,/review(self-review), test,/ship, update ticket. Only asks the user when confidence is below 80% or tests fail after 2 attempts. Everything else is autonomous./memoryadds persistent knowledge across sessions. Stores bug patterns, fixes, lessons, and anti-patterns in~/.gstack/memory/as markdown files. Other skills use it automatically:/investigatesearches for similar patterns before debugging,/reviewchecks for known anti-patterns in the diff,/shipindexes the fix after merge. Includes/memory importfor one-time backfill from git history with quality filters (skips reverted commits, incomplete fixes).Memory compounds over time. Session 1 indexes 0 patterns. Session 101 starts with 100 patterns to search against. Extends "Search Before Building" (Layer 1-3: external knowledge) to Layer 0: your own past work.
What changed
solve/SKILL.md.tmpl{{PREAMBLE}}+ memory-specific preamble extensionsolve/SKILL.mdmemory/SKILL.md.tmpl{{PREAMBLE}}+ memory stats preamble extensionmemory/SKILL.mdContext
Built this after running gstack on our CI pipeline (~50 issues, 4500+ PRs). Two gaps we hit:
/investigatefound a null-check bug Monday. Wednesday, exact same pattern in a different service, started from zero. Memory would have flagged it in seconds./solveis that orchestrator as a native skill.Both follow gstack conventions:
.tmplfiles with{{PREAMBLE}}, standard preamble, telemetry, proactive config, Boil the Lake intro. Happy to adapt anything to fit the build system better.