fix: CRLF frontmatter parsing, duplicate cwd crash, STATE.md phase transitions (#1105)

- fix(frontmatter): handle CRLF line endings in extractFrontmatter,
  spliceFrontmatter, and parseMustHavesBlock — fixes wave parsing on
  Windows where all plans reported as wave 1 (#1085)

- fix(hooks): remove duplicate const cwd declaration in
  gsd-context-monitor.js that caused SyntaxError on every PostToolUse
  invocation (#1091, #1092, #1094)

- feat(state): add 'state begin-phase' command that updates STATUS,
  Last Activity, Current focus, Current Position, and plan counts
  when a new phase starts executing (#1102, #1103, #1104)

- docs(workflow): add state begin-phase call to execute-phase workflow
  validate_phase step so STATE.md is current from the start
This commit is contained in:
Tom Boucher
2026-03-16 15:40:21 -04:00
committed by GitHub
parent 80605d2051
commit 2842f076ea
5 changed files with 99 additions and 6 deletions

View File

@@ -115,7 +115,6 @@ process.stdin.on('end', () => {
fs.writeFileSync(warnPath, JSON.stringify(warnData));
// Detect if GSD is active (has .planning/STATE.md in working directory)
const cwd = data.cwd || process.cwd();
const isGsdActive = fs.existsSync(path.join(cwd, '.planning', 'STATE.md'));
// Build advisory warning message (never use imperative commands that