bugfix(onboard): include post-init decisions in WELCOME.md#16
Open
CryptoJones wants to merge 1 commit into
Open
bugfix(onboard): include post-init decisions in WELCOME.md#16CryptoJones wants to merge 1 commit into
CryptoJones wants to merge 1 commit into
Conversation
\`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`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):
WELCOME.md (proving the bug). Init decision still present too.
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).