Skip to content

bugfix(onboard): include post-init decisions in WELCOME.md#16

Open
CryptoJones wants to merge 1 commit into
mainfrom
bugfix/onboard-includes-post-init-decisions
Open

bugfix(onboard): include post-init decisions in WELCOME.md#16
CryptoJones wants to merge 1 commit into
mainfrom
bugfix/onboard-includes-post-init-decisions

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

`socrates decide` appends bullets to a 'Decisions added after init'
section of DECISIONS.md. `socrates onboard` was reading ONLY the
'Decisions captured during Sprint 001 discovery' section (markdown
fallback path) or `answers.decisions` (json path) — both frozen at
init time. So a new collaborator opening WELCOME.md after the team
made a major reversal would read the OLD decision and miss the new
one.

Fix both rendering paths:

  • _synthesize_from_answers: new `_post_init_decisions(project)`
    helper reads DECISIONS.md's "Decisions added after init" section,
    reverses (newest at bottom -> top), and prepends to
    answers.decisions. Up to MAX_BULLETS total in WELCOME.md.

  • _synthesize_from_markdown: call `_top_bullets` twice — once for
    the post-init section, once for the init section — combine
    post-init-first.

Tests added (2):

  • post-init decision appended via `socrates decide` appears in
    WELCOME.md (proving the bug). Init decision still present too.
  • ordering: newer reversal appears ABOVE original init choice in
    the rendered bullets.

149/149 tests pass; ruff + mypy clean.

Self-review caveat: assumes newest post-init decisions are at the BOTTOM of the section. True for record_decision's append behavior — brittle if an operator hand-edits to insert at top. Then ordering would be wrong (newest shown last).

\`socrates decide\` appends bullets to a 'Decisions added after init'
section of DECISIONS.md. \`socrates onboard\` was reading ONLY the
'Decisions captured during Sprint 001 discovery' section (markdown
fallback path) or \`answers.decisions\` (json path) — both frozen at
init time. So a new collaborator opening WELCOME.md after the team
made a major reversal would read the OLD decision and miss the new
one.

Fix both rendering paths:

- _synthesize_from_answers: new \`_post_init_decisions(project)\`
  helper reads DECISIONS.md's "Decisions added after init" section,
  reverses (newest at bottom -> top), and prepends to
  answers.decisions. Up to MAX_BULLETS total in WELCOME.md.

- _synthesize_from_markdown: call \`_top_bullets\` twice — once for
  the post-init section, once for the init section — combine
  post-init-first.

Tests added (2):
- post-init decision appended via \`socrates decide\` appears in
  WELCOME.md (proving the bug). Init decision still present too.
- ordering: newer reversal appears ABOVE original init choice in
  the rendered bullets.

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