Skip to content

[schemas] Thought lifecycle receipt log - #460

Open
Nev-Harris wants to merge 1 commit into
NateBJones-Projects:mainfrom
Nev-Harris:contrib/Nev-Harris/thought-lifecycle
Open

[schemas] Thought lifecycle receipt log#460
Nev-Harris wants to merge 1 commit into
NateBJones-Projects:mainfrom
Nev-Harris:contrib/Nev-Harris/thought-lifecycle

Conversation

@Nev-Harris

Copy link
Copy Markdown

Contribution Type

  • Schema (/schemas)

What does this do?

Adds schemas/thought-lifecycle/ — an append-only thought_lifecycle_events receipt log plus a single transactional write path for lifecycle and correction actions (done / defer / needs-review / archive / supersede / correct) on Open Brain thoughts. The mutation and its receipt commit or roll back together, so a thought can't be changed without a matching receipt; a partial UNIQUE index makes "one execution per brief item" a database rule rather than a check-then-write race.

It's purely additive — no changes to the core thoughts table structure and none to the MCP server. The action→status projection lives in the database, so upstream consumers (dashboards, status filters) only ever see legal Open Brain statuses. The pack stands alone: its optional touchpoints with provenance-chains and a brief-store outcome table are exception-guarded, so their absence is a graceful no-op with a warning, not a failure.

Requirements

  • A working Open Brain instance (base thoughts table).
  • The workflow-status schema applied (thoughts.status / status_updated_at).
  • pgvector (ships with core Open Brain) — correct_thought rewrites thoughts.embedding.
  • Supabase service_role (RLS and function grants are restricted to it).

No external services, no paid dependencies.

Checklist

  • I've read CONTRIBUTING.md
  • README has prerequisites, numbered installation steps, expected outcome, and troubleshooting
  • metadata.json has all required fields
  • Tested on my own Open Brain instance
  • No credentials, API keys, or secrets

Append-only thought_lifecycle_events log plus a single transactional write path so every lifecycle/correction action on an Open Brain thought commits together with its receipt. Additive: no changes to the core thoughts table structure or the MCP server. Optional touchpoints with other schemas are exception-guarded, so the pack stands alone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the schema Contribution: database extension label Jul 22, 2026
@github-actions

Copy link
Copy Markdown

Hey @Nev-Harris — welcome to Open Brain Source! 👋

Thanks for submitting your first PR. The automated review will run shortly and check things like metadata, folder structure, and README completeness. If anything needs fixing, the review comment will tell you exactly what.

Once the automated checks pass, a human admin will review for quality and clarity. Expect a response within a few days.

If you have questions, check out CONTRIBUTING.md or open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

schema Contribution: database extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant