From 50bea6e73ad7ca1e686ec2e92c17e7fc07826f19 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Tue, 17 Mar 2026 23:45:55 -0400 Subject: [PATCH] feat: auto-extract lessons to KNOWLEDGE.md on slice/milestone completion (#711) (#1081) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: add Node LTS pinning guide for macOS Homebrew users New doc (docs/node-lts-macos.md) explains how to pin Node 24 LTS via Homebrew to avoid running on odd-numbered development releases. Covers brew install/link/pin, version managers as alternatives, and verification steps. Added notice banner in README linking to the guide. * feat: auto-extract lessons to KNOWLEDGE.md on slice/milestone completion (#711) Added knowledge extraction steps to completion prompts: - complete-slice.md step 9: review task summaries for patterns, gotchas, and non-obvious lessons → append to KNOWLEDGE.md - complete-milestone.md step 9: review all slice summaries for cross-cutting insights → append to KNOWLEDGE.md Combined with the existing execute-task step 13 (which already tells agents to append discoveries during execution), this creates a three-layer extraction pipeline: task → slice → milestone. --- src/resources/extensions/gsd/prompts/complete-milestone.md | 3 ++- src/resources/extensions/gsd/prompts/complete-slice.md | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/resources/extensions/gsd/prompts/complete-milestone.md b/src/resources/extensions/gsd/prompts/complete-milestone.md index 9646d236a..0018fe787 100644 --- a/src/resources/extensions/gsd/prompts/complete-milestone.md +++ b/src/resources/extensions/gsd/prompts/complete-milestone.md @@ -23,7 +23,8 @@ Then: 6. Write `{{milestoneSummaryPath}}` using the milestone-summary template. Fill all frontmatter fields and narrative sections. The `requirement_outcomes` field must list every requirement that changed status with `from_status`, `to_status`, and `proof`. 7. Update `.gsd/REQUIREMENTS.md` if any requirement status transitions were validated in step 5. 8. Update `.gsd/PROJECT.md` to reflect milestone completion and current project state. -9. Do not commit manually — the system auto-commits your changes after this unit completes. +9. Review all slice summaries for cross-cutting lessons, patterns, or gotchas that emerged during this milestone. Append any non-obvious, reusable insights to `.gsd/KNOWLEDGE.md`. +10. Do not commit manually — the system auto-commits your changes after this unit completes. **Important:** Do NOT skip the success criteria and definition of done verification (steps 3-4). The milestone summary must reflect actual verified outcomes, not assumed success. If any criterion was not met, document it clearly in the summary and do not mark the milestone as passing verification. diff --git a/src/resources/extensions/gsd/prompts/complete-slice.md b/src/resources/extensions/gsd/prompts/complete-slice.md index e9490a924..72c51e947 100644 --- a/src/resources/extensions/gsd/prompts/complete-slice.md +++ b/src/resources/extensions/gsd/prompts/complete-slice.md @@ -27,9 +27,10 @@ Then: 6. Write `{{sliceSummaryPath}}` (compress all task summaries). 7. Write `{{sliceUatPath}}` — a concrete UAT script with real test cases derived from the slice plan and task summaries. Include preconditions, numbered steps with expected outcomes, and edge cases. This must NOT be a placeholder or generic template — tailor every test case to what this slice actually built. 8. Review task summaries for `key_decisions`. Append any significant decisions to `.gsd/DECISIONS.md` if missing. -9. Mark {{sliceId}} done in `{{roadmapPath}}` (change `[ ]` to `[x]`) -10. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds. -11. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed. +9. Review task summaries for patterns, gotchas, or non-obvious lessons learned. If any would save future agents from repeating investigation or hitting the same issues, append them to `.gsd/KNOWLEDGE.md`. Only add entries that are genuinely useful — don't pad with obvious observations. +10. Mark {{sliceId}} done in `{{roadmapPath}}` (change `[ ]` to `[x]`) +11. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds. +12. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed. **You MUST do ALL THREE before finishing: (1) write `{{sliceSummaryPath}}`, (2) write `{{sliceUatPath}}`, (3) mark {{sliceId}} as `[x]` in `{{roadmapPath}}`. The unit will not be marked complete if any of these files are missing.**