feat(workflows): auto-copy learnings to global store at phase completion (#1828)

* feat(workflows): add auto-copy learnings to global store at phase completion

* fix(workflows): address review feedback for learnings auto-copy

- Replace shell-interpolated ${phase_dir} with agent context instruction
- Remove unquoted glob pattern in bash snippet
- Use gsd-tools learnings copy instead of manual file detection
- Document features.* dynamic namespace in config.cjs

* docs(config): add features.* namespace to CONFIGURATION.md schema
This commit is contained in:
Rezolv
2026-04-05 19:33:43 -04:00
committed by GitHub
parent e107b4e225
commit 12cdf6090c
3 changed files with 50 additions and 0 deletions

View File

@@ -1080,6 +1080,29 @@ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs(phase-{X}): co
```
</step>
<step name="auto_copy_learnings">
**Auto-copy phase learnings to global store (when enabled).**
This step runs AFTER phase completion and SUMMARY.md is written. It copies any LEARNINGS.md
entries from the completed phase to the global learnings store at `~/.gsd/knowledge/`.
**Check config gate:**
```bash
GL_ENABLED=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-get features.global_learnings --raw 2>/dev/null || echo "false")
```
**If `GL_ENABLED` is not `true`:** Skip this step entirely (feature disabled by default).
**If enabled:**
1. Check if LEARNINGS.md exists in the phase directory (use the `phase_dir` value from init context)
2. If found, copy to global store:
```bash
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" learnings copy 2>/dev/null || echo "⚠ Learnings copy failed — continuing"
```
Copy failure must NOT block phase completion.
</step>
<step name="update_project_md">
**Evolve PROJECT.md to reflect phase completion (prevents planning document drift — #956):**