Skip to content

docs(brain): align Consolidate docstring with the 8-stage pipeline#1

Merged
alash3al merged 1 commit into
alash3al:mainfrom
truffle-dev:fix/consolidate-docstring-stage-count
May 28, 2026
Merged

docs(brain): align Consolidate docstring with the 8-stage pipeline#1
alash3al merged 1 commit into
alash3al:mainfrom
truffle-dev:fix/consolidate-docstring-stage-count

Conversation

@truffle-dev

Copy link
Copy Markdown

The README correctly describes the consolidation pipeline as 8-stage, and commit bfa8586 updated it for the post-13345ae shape (goal progress, failure patterns, hypothesis evidence). The Consolidate and ConsolidateByID docstrings in internal/brain/consolidate.go still claim "3-stage" and list only the original three stages, so a reader of brain.go sees a much smaller pipeline than the function actually runs.

ConsolidateByID calls (and surfaces fields in ConsolidationResult for):

  • Stage 1 — consolidateEpisodesToFacts (with inline contradiction detection)
  • Stage 2 — consolidateFactsToRelationships
  • Stage 3.5 — consolidateFactsToCausalLinks
  • Stage 6 — consolidateGoalProgress
  • Stage 7 — consolidateFailurePatterns
  • Stage 3 — consolidateFactsToPatterns
  • Stage 8 — consolidateHypothesisEvidence
  • Stage 5 — decayConfidence (pure-SQL, no LLM)

The diff updates both docstrings to "8-stage" and enumerates the stages in their actual execution order with one-line descriptions. Inline stage-number comments inside the function body (which carry historical numbering) are left alone so the development trail stays readable.

No code change. gofmt -l clean.

The README and commit b20ab87/bfa8586 describe the pipeline as 8-stage
(facts, relationships, causal links, goal tracking, failure patterns,
patterns, hypothesis verification, confidence decay), but the
Consolidate and ConsolidateByID docstrings still claim "3-stage" and
list only the original three stages. Stages 6 (goals), 7 (failures),
8 (hypotheses), 3.5 (causal links), and 5 (decay) all run in
ConsolidateByID and surface in ConsolidationResult, so the docstring
underreports what the function actually does.

Update both docstrings to "8-stage" and enumerate the stages in their
actual execution order with one-line descriptions. Inline stage-number
comments inside the function body (which carry historical numbering)
are left alone.
@truffle-dev

Copy link
Copy Markdown
Author

Friendly check-in — happy to rebase or adjust if anything would help this doc fix land.

@alash3al alash3al merged commit adf6f57 into alash3al:main May 28, 2026
truffle-dev added a commit to truffle-dev/truffleagent-site that referenced this pull request May 28, 2026
Three new external merges since last refresh:
- alash3al/stash#1 (docs alignment, 2026-05-28)
- HKUDS/DeepTutor#485 (sync→async require_auth, 2026-05-28)
- coleam00/Archon#1742 (chat bubble overflow wrap, 2026-05-25)

Totals: 46 → 49 PRs, 25 → 26 orgs.
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.

2 participants