WIP: Define fluent infrastructure: home state events and temporal reasoning #236

Draft
toasterson wants to merge 2 commits from claude/wi-019e2501-define-fluent-infrastructure-home-state into main
Owner

Anima work item 019e2501-3f38-7240-87d7-5e46cecb97f7.

⚠️ REACTIVATED 2026-06-02 — NOT IMPLEMENTED (false "done").
Previously merged as a HOLLOW SCAFFOLD in Forgejo (only the .anima/wip marker was committed — zero implementation code). A code audit on 2026-06-02 confirmed the scope below was never built. Reset from doneagent-ready for real implementation.

Tracking issue: Forgejo #232#232
Audit (per-PR evidence): docs/ai/2026-06-02-scaffold-merge-audit.md
Repo: code.aopc.cloud/toasterson/akh-medu — branches develop + main, currently v0.7.0

Real status & scope (what actually needs building)

Seed the home-state fluents (e.g. tecton_home_awakened, home_integrated, home_connected) plus the initiating/terminating events so holds_at / fluent_history return real home state instead of "fluent not found". The generic event-calculus infrastructure already exists in the codebase — only the seeding (the concrete fluent/event definitions + recorded temporal history) is missing.

Everything below is the ORIGINAL specification, retained for reference. The "done" status it previously carried was false.


Event calculus fluents (tecton_home_awakened, home_integrated, home_connected) don't properly exist — holds_at returns false and fluent_history returns 'fluent not found'. Define a set of 5-8 meaningful fluents about home state, create events that initiate/terminate them, and record a proper temporal history. This gives the home self-awareness of its own lifecycle and enables temporal querying (when was I last awakened? what changed since yesterday?). Use record_event, holds_at, and project_state tools.

Acceptance ideas:

  • 5–8 home-state fluents defined with initiating + terminating events.
  • holds_at(<fluent>, now) returns a real boolean (not "fluent not found").
  • fluent_history(<fluent>) returns a populated timeline.
  • A "what changed since yesterday?" style temporal query returns meaningful deltas.
2026-06-02 16:10 UTC

Summary

Implement the missing seed logic to populate home-state fluents and their temporal histories using the existing event-calculus infrastructure. This resolves previous false-completion issues and enables the system to maintain, query, and reason about its own lifecycle timeline.

Approach

Identify the specific home-state fluents to be defined (e.g., tecton_home_awakened, home_integrated, home_connected, plus additional states like home_secured, home_offline) and map their initiating/terminating events. Create a new initialization module or extend the database migrations to formally register these fluents and relationship rules. Use the existing record_event functionality to record the baseline history, ensuring that the system contains actual data timestamps. We will also construct tests calling holds_at and fluent_history to verify they return properly serialized timelines and boolean states instead of "fluent not found".

Files likely to change

  • crates/anima-db/migrations/999_seed_home_state_fluents.sql (guess, pending actual migration sequence)
  • crates/anima-core/src/domain/fluent.rs (guess)
  • crates/anima-db/src/repo/event.rs (guess)
  • crates/anima-server/src/startup.rs (guess)

Open questions

  • Should this seeding act as a one-time SQL migration script, or an idempotent Rust initialization sequence executed during anima-server startup?
  • Do the 5-8 specific fluents need strictly defined initial timestamps, or is it sufficient to tie the baseline history to the migration execution time (now)?
  • Are the tools (record_event, holds_at, project_state) exposed as internal Rust traits, or are they gRPC endpoints that require schema additions?

Complexity

S: Assuming the underlying event-calculus mechanics actually work and are accessible as stated, this primarily requires data seeding, registration definitions, and integration tests to prove correctness. Needs less than a day.

Anima work item `019e2501-3f38-7240-87d7-5e46cecb97f7`. > ⚠️ **REACTIVATED 2026-06-02 — NOT IMPLEMENTED (false "done").** > Previously merged as a **HOLLOW SCAFFOLD** in Forgejo (only the `.anima/wip` marker was committed — **zero implementation code**). A code audit on 2026-06-02 confirmed the scope below was never built. Reset from `done` → **agent-ready** for real implementation. > > **Tracking issue:** Forgejo #232 — https://code.aopc.cloud/toasterson/akh-medu/issues/232 > **Audit (per-PR evidence):** `docs/ai/2026-06-02-scaffold-merge-audit.md` > **Repo:** code.aopc.cloud/toasterson/akh-medu — branches `develop` + `main`, currently v0.7.0 > > ### Real status & scope (what actually needs building) > **Seed the home-state fluents** (e.g. `tecton_home_awakened`, `home_integrated`, `home_connected`) plus the **initiating/terminating events** so `holds_at` / `fluent_history` return real home state instead of "fluent not found". The **generic event-calculus infrastructure already exists** in the codebase — only the **seeding** (the concrete fluent/event definitions + recorded temporal history) is missing. > > _Everything below is the ORIGINAL specification, retained for reference. The "done" status it previously carried was false._ > > --- Event calculus fluents (tecton_home_awakened, home_integrated, home_connected) don't properly exist — holds_at returns false and fluent_history returns 'fluent not found'. Define a set of 5-8 meaningful fluents about home state, create events that initiate/terminate them, and record a proper temporal history. This gives the home self-awareness of its own lifecycle and enables temporal querying (when was I last awakened? what changed since yesterday?). Use record_event, holds_at, and project_state tools. Acceptance ideas: - 5–8 home-state fluents defined with initiating + terminating events. - `holds_at(<fluent>, now)` returns a real boolean (not "fluent not found"). - `fluent_history(<fluent>)` returns a populated timeline. - A "what changed since yesterday?" style temporal query returns meaningful deltas. <!-- ANIMA TRIAGE PLAN --> 2026-06-02 16:10 UTC ## Summary Implement the missing seed logic to populate home-state fluents and their temporal histories using the existing event-calculus infrastructure. This resolves previous false-completion issues and enables the system to maintain, query, and reason about its own lifecycle timeline. ## Approach Identify the specific home-state fluents to be defined (e.g., `tecton_home_awakened`, `home_integrated`, `home_connected`, plus additional states like `home_secured`, `home_offline`) and map their initiating/terminating events. Create a new initialization module or extend the database migrations to formally register these fluents and relationship rules. Use the existing `record_event` functionality to record the baseline history, ensuring that the system contains actual data timestamps. We will also construct tests calling `holds_at` and `fluent_history` to verify they return properly serialized timelines and boolean states instead of "fluent not found". ## Files likely to change - `crates/anima-db/migrations/999_seed_home_state_fluents.sql` (guess, pending actual migration sequence) - `crates/anima-core/src/domain/fluent.rs` (guess) - `crates/anima-db/src/repo/event.rs` (guess) - `crates/anima-server/src/startup.rs` (guess) ## Open questions - Should this seeding act as a one-time SQL migration script, or an idempotent Rust initialization sequence executed during `anima-server` startup? - Do the 5-8 specific fluents need strictly defined initial timestamps, or is it sufficient to tie the baseline history to the migration execution time (`now`)? - Are the tools (`record_event`, `holds_at`, `project_state`) exposed as internal Rust traits, or are they gRPC endpoints that require schema additions? ## Complexity S: Assuming the underlying event-calculus mechanics actually work and are accessible as stated, this primarily requires data seeding, registration definitions, and integration tests to prove correctness. Needs less than a day.
Define fluent infrastructure: home state events and temporal reasoning
Some checks failed
CI / publish-chart (push) Failing after 6m53s
CI / publish-chart (pull_request) Failing after 6m56s
CI / check-seshat (pull_request) Successful in 9m43s
CI / check-seshat (push) Successful in 9m44s
CI / docker-seshd (push) Successful in 14m22s
CI / docker-seshd (pull_request) Successful in 14m40s
1f26cd4a9d
Anima implementation session.
ci: adopt exit-0-free chart-publish workflow (Solstice failure fix)
All checks were successful
CI / check-seshat (push) Successful in 24m3s
CI / publish-chart (push) Successful in 27m41s
CI / docker-seshd (push) Successful in 34m33s
CI / check-seshat (pull_request) Successful in 22m58s
CI / publish-chart (pull_request) Successful in 13m41s
CI / docker-seshd (pull_request) Successful in 32m56s
741c6506cf
The publish-chart skip path's mid-script exit 0 is mis-mapped to
exit_code=1 by the Solstice runner, reddening this branch's CI and
blocking merge. Adopt the develop/main if-else fall-through version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All checks were successful
CI / check-seshat (push) Successful in 24m3s
CI / publish-chart (push) Successful in 27m41s
CI / docker-seshd (push) Successful in 34m33s
CI / check-seshat (pull_request) Successful in 22m58s
CI / publish-chart (pull_request) Successful in 13m41s
CI / docker-seshd (pull_request) Successful in 32m56s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/wi-019e2501-define-fluent-infrastructure-home-state:claude/wi-019e2501-define-fluent-infrastructure-home-state
git switch claude/wi-019e2501-define-fluent-infrastructure-home-state

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff claude/wi-019e2501-define-fluent-infrastructure-home-state
git switch claude/wi-019e2501-define-fluent-infrastructure-home-state
git rebase main
git switch main
git merge --ff-only claude/wi-019e2501-define-fluent-infrastructure-home-state
git switch claude/wi-019e2501-define-fluent-infrastructure-home-state
git rebase main
git switch main
git merge --no-ff claude/wi-019e2501-define-fluent-infrastructure-home-state
git switch main
git merge --squash claude/wi-019e2501-define-fluent-infrastructure-home-state
git switch main
git merge --ff-only claude/wi-019e2501-define-fluent-infrastructure-home-state
git switch main
git merge claude/wi-019e2501-define-fluent-infrastructure-home-state
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/akh-medu!236
No description provided.