Skip to content

bugfix(onboard): derive active sprint from directories, not hardcoded '001'#9

Open
CryptoJones wants to merge 1 commit into
mainfrom
bugfix/onboard-derive-active-sprint-from-dirs
Open

bugfix(onboard): derive active sprint from directories, not hardcoded '001'#9
CryptoJones wants to merge 1 commit into
mainfrom
bugfix/onboard-derive-active-sprint-from-dirs

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

_synthesize_from_answers hardcoded the sprint label to
"001 — Discovery & Architecture"
on every WELCOME.md generation, regardless of the project's actual
progress. A project that had advanced through Sprint 005 still got
a welcome page introducing collaborators to a sprint that closed
months ago — exactly the kind of stale-handoff onboard is meant to
prevent.

The markdown-fallback path had a related drift: it read the active
sprint from a free-text STATE.md section, which goes stale the
moment the operator forgets to update STATE.md between sprints.

Both paths now share a single ground-truth source: the highest-numbered
canonical sprint folder under planning/sprints/ (matched by ^NNN-).
Stray dirs (draft/, notes/, backup-002/) are ignored.

Added _format_sprint_label() that converts
planning/sprints/005-rebate-engine
into
005 — Rebate Engine

Tests added (2):

  • project with a 005-rebate-engine dir → WELCOME.md says "005 /
    Rebate Engine", not "001 / Discovery & Architecture"
  • stray non-canonical dirs (draft/, backup-002/, notes/) are
    ignored — the canonical 001 still wins as the active sprint

149/149 tests pass; ruff + mypy clean.

Self-review caveat: the two synthesis paths (_synthesize_from_answers vs _synthesize_from_markdown) emit slightly different fallback strings when no canonical sprint dir exists. Minor cosmetic inconsistency.

… "001"

`_synthesize_from_answers` hardcoded the sprint label to
  "**001 — Discovery & Architecture**"
on every WELCOME.md generation, regardless of the project's actual
progress. A project that had advanced through Sprint 005 still got
a welcome page introducing collaborators to a sprint that closed
months ago — exactly the kind of stale-handoff onboard is meant to
prevent.

The markdown-fallback path had a related drift: it read the active
sprint from a free-text STATE.md section, which goes stale the
moment the operator forgets to update STATE.md between sprints.

Both paths now share a single ground-truth source: the highest-numbered
canonical sprint folder under planning/sprints/ (matched by ^NNN-).
Stray dirs (draft/, notes/, backup-002/) are ignored.

Added _format_sprint_label() that converts
  planning/sprints/005-rebate-engine
into
  **005 — Rebate Engine**

Tests added (2):
- project with a 005-rebate-engine dir → WELCOME.md says "005 /
  Rebate Engine", not "001 / Discovery & Architecture"
- stray non-canonical dirs (draft/, backup-002/, notes/) are
  ignored — the canonical 001 still wins as the active sprint

149/149 tests pass; ruff + mypy clean.
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