Skip to content

SUM-008 Foresight signals and procedural skill memory - #77

Merged
G9000 merged 11 commits into
codex/sum-001-memory-baselinefrom
codex/sum-008-009-foresight-procedural
Jul 3, 2026
Merged

SUM-008 Foresight signals and procedural skill memory#77
G9000 merged 11 commits into
codex/sum-001-memory-baselinefrom
codex/sum-008-009-foresight-procedural

Conversation

@G9000

@G9000 G9000 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements SUM-008 foresight signals with encrypted soul storage, deterministic relative-date extraction, lifecycle sweeping, consolidation writes, and prompt block rendering.
  • Implements SUM-009 procedural experience memory with encrypted experience rows, stable clustering, skill distillation, growth-log entries, background capture, and prompt retrieval that prioritizes learned skills over raw approaches.
  • Adds a narrow guard to the inherited SUM-006 salience migration so stamped legacy soul databases missing memory_items can reach metadata repair.

Affected Areas

  • apps/server models, Alembic core migrations, agent consolidation, sleep tasks, prompt budget, prompt memory blocks, and agent post-turn hooks.
  • tickets/single-user-temporal-memory-v2 parent and child ticket status/validation.

Stack

Validation

  • ANIMA_CORE_REQUIRE_ENCRYPTION=false bun run test:server apps/server/tests/test_foresight.py apps/server/tests/test_agent_experience.py - 8 passed, 8 warnings.
  • ANIMA_CORE_REQUIRE_ENCRYPTION=false bun run test:server apps/server/tests/test_agent_memory_blocks.py apps/server/tests/test_prompt_budget.py apps/server/tests/test_sleep_agent.py apps/server/tests/test_agent_service.py - 64 passed, 24 warnings.
  • ANIMA_CORE_REQUIRE_ENCRYPTION=false bun run test:server -- --maxfail=1 -q - 1775 passed, 1 skipped, 310 warnings.
  • ANIMA_CORE_REQUIRE_ENCRYPTION=false bun run test:server apps/server/tests/test_agent_memory_blocks.py - 7 passed, 6 warnings after formatting cleanup.
  • ANIMA_CORE_REQUIRE_ENCRYPTION=false bun run lint:server - passed.
  • ANIMA_CORE_REQUIRE_ENCRYPTION=false bun run build - passed with existing Vite chunk-size warning.
  • bun run db:server:heads - 20260703_0002 (head).
  • git diff --cached --check - passed.
  • ANIMA_CORE_REQUIRE_ENCRYPTION=false uv run --project apps/server python - - health smoke for GET /health: 200 ok.

@G9000
G9000 marked this pull request as ready for review July 2, 2026 19:42
@G9000

G9000 commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review pwease

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e233908fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
Comment thread apps/server/src/anima_server/services/agent/consolidation.py Outdated
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b356a5ed05

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/sleep_tasks.py
Comment thread apps/server/src/anima_server/services/agent/agent_experience.py Outdated
Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e971f39814

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/agent_experience.py
Comment thread apps/server/src/anima_server/services/agent/consolidation.py
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12804439bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a65c363d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
Comment thread apps/server/src/anima_server/services/agent/service.py
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c237c346ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c18b73dff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/service.py Outdated
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a6c52e67e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
Comment thread apps/server/src/anima_server/services/agent/agent_experience.py
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef0391799f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/models/agent_runtime.py
Comment thread apps/server/src/anima_server/services/agent/foresight.py
Comment thread apps/server/src/anima_server/services/agent/foresight.py
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 503d602fee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/anima_server/services/agent/foresight.py Outdated
@G9000

G9000 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 721758b122

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@G9000
G9000 merged commit 545d6fb into codex/sum-001-memory-baseline Jul 3, 2026
@G9000
G9000 deleted the codex/sum-008-009-foresight-procedural branch July 3, 2026 06:50
G9000 added a commit that referenced this pull request Jul 3, 2026
* memory: baseline temporal memory audit

* memory: address baseline review feedback

* memory: reset kg vault restore sequences

* memory: fix default sleep cursor runtime factory

* memory: guard sleep cursor on candidate backlog

* memory: include extraction failures in sleep cursor guard

* SUM-002 evidence baseline and episode quality (#68)

* memory: add evidence audit and episode quality safeguards

* SUM-003 temporal knowledge graph v2 (#70)

* memory: add temporal knowledge graph v2

* memory: fix temporal kg review regressions

* api: filter superseded graph relations

* db: repair legacy kg schema columns

* memory: preserve kg alias reads and confidence

* memory: resolve kg context aliases

* memory: resolve kg alias pruning

* memory: filter kg pruning candidates

* db: guard legacy kg downgrade

* memory: prevent kg self supersession

* SUM-004 structured user profile (#71)

* memory: add structured user profile

* memory: address profile review feedback

* memory: invalidate profile cache after forget

* memory: hard-delete forgotten profile state

* memory: preserve profile fields with surviving evidence

* memory: link profile forget cleanup to runtime provenance

* memory: narrow runtime profile forget provenance

* memory: preserve manual profile corrections

* memory: reject forgotten profile candidates

* memory: canonicalize profile corrections

* memory: narrow profile claim reconciliation

* memory: tighten profile forget matching

* memory: preserve profile vault state

* memory: dedupe claim profile reconciliation

* memory: restore profile vault links safely

* memory: delete profile evidence on forget

* memory: preserve newer profile reconciliation

* memory: return bad request for blank profile corrections

* memory: preserve profile candidate timestamps

* memory: scope profile forget cleanup

* memory: prioritize profile prompt block

* memory: truncate profile prompt lines

* memory: restore prior profile on forget

* SUM-006 add salience-aware decay and soft evolution (#75)

* memory: add salience-aware decay

* memory: address salience review comments

* memory: refresh heat after salience reinforcement

* memory: preserve neutral salience heat defaults

* memory: preserve duplicate candidate salience

* memory: refresh promoted duplicate candidate evidence

* memory: preserve candidate audit history

* memory: repair legacy salience schema

* memory: rebase salience migrations

* memory: preserve zero evidence strength restore

* memory: update duplicate reinforcement test

* memory: mark reinforced candidates distinctly

* memory: treat reinforced candidates as terminal

* SUM-007 Cross-episode pattern synthesis (#76)

* memory: synthesize cross-episode patterns

* memory: tighten pattern synthesis prompt wording

* docs: record SUM-007 full-suite result

* memory: skip duplicate pattern evidence

* memory: decrypt pattern episode arcs

* memory: address pattern synthesis review

* memory: clean stale pattern synthesis references

* memory: clean deleted pattern indexes

* memory: decrypt pattern evidence for forget cleanup

* memory: delete derived pattern evidence

* SUM-008 Foresight signals and procedural skill memory (#77)

* memory: add foresight and procedural learning

* memory: fix foresight review regressions

* memory: address foresight and skill review follow-ups

* memory: fix foresight extraction and cluster state review

* memory: prioritize dated foresight in prompts

* memory: address timezone and resume review

* memory: use local dates for foresight views

* memory: redact procedural tool outputs

* memory: address foresight and procedural review

* memory: cover vault review fixes

* memory: tighten foresight cancellation matching

* memory: add optional retrieval adapter seams (#78)

* memory: add memory v2 package boundary

* memory: rename package boundary

* memory: add retrieval router plans

* docs: plan memory package boundary hardening

* memory: clean durable rows on reset and forget

* docs: add memory architecture diagrams

* memory: align salience evidence contract

* memory: narrow foresight forget cleanup

* vault: defer kg relation self-links on import
G9000 added a commit that referenced this pull request Jul 13, 2026
* memory: baseline temporal memory audit

* memory: address baseline review feedback

* memory: reset kg vault restore sequences

* memory: fix default sleep cursor runtime factory

* memory: guard sleep cursor on candidate backlog

* memory: include extraction failures in sleep cursor guard

* SUM-002 evidence baseline and episode quality (#68)

* memory: add evidence audit and episode quality safeguards

* SUM-003 temporal knowledge graph v2 (#70)

* memory: add temporal knowledge graph v2

* memory: fix temporal kg review regressions

* api: filter superseded graph relations

* db: repair legacy kg schema columns

* memory: preserve kg alias reads and confidence

* memory: resolve kg context aliases

* memory: resolve kg alias pruning

* memory: filter kg pruning candidates

* db: guard legacy kg downgrade

* memory: prevent kg self supersession

* SUM-004 structured user profile (#71)

* memory: add structured user profile

* memory: address profile review feedback

* memory: invalidate profile cache after forget

* memory: hard-delete forgotten profile state

* memory: preserve profile fields with surviving evidence

* memory: link profile forget cleanup to runtime provenance

* memory: narrow runtime profile forget provenance

* memory: preserve manual profile corrections

* memory: reject forgotten profile candidates

* memory: canonicalize profile corrections

* memory: narrow profile claim reconciliation

* memory: tighten profile forget matching

* memory: preserve profile vault state

* memory: dedupe claim profile reconciliation

* memory: restore profile vault links safely

* memory: delete profile evidence on forget

* memory: preserve newer profile reconciliation

* memory: return bad request for blank profile corrections

* memory: preserve profile candidate timestamps

* memory: scope profile forget cleanup

* memory: prioritize profile prompt block

* memory: truncate profile prompt lines

* memory: restore prior profile on forget

* SUM-006 add salience-aware decay and soft evolution (#75)

* memory: add salience-aware decay

* memory: address salience review comments

* memory: refresh heat after salience reinforcement

* memory: preserve neutral salience heat defaults

* memory: preserve duplicate candidate salience

* memory: refresh promoted duplicate candidate evidence

* memory: preserve candidate audit history

* memory: repair legacy salience schema

* memory: rebase salience migrations

* memory: preserve zero evidence strength restore

* memory: update duplicate reinforcement test

* memory: mark reinforced candidates distinctly

* memory: treat reinforced candidates as terminal

* SUM-007 Cross-episode pattern synthesis (#76)

* memory: synthesize cross-episode patterns

* memory: tighten pattern synthesis prompt wording

* docs: record SUM-007 full-suite result

* memory: skip duplicate pattern evidence

* memory: decrypt pattern episode arcs

* memory: address pattern synthesis review

* memory: clean stale pattern synthesis references

* memory: clean deleted pattern indexes

* memory: decrypt pattern evidence for forget cleanup

* memory: delete derived pattern evidence

* SUM-008 Foresight signals and procedural skill memory (#77)

* memory: add foresight and procedural learning

* memory: fix foresight review regressions

* memory: address foresight and skill review follow-ups

* memory: fix foresight extraction and cluster state review

* memory: prioritize dated foresight in prompts

* memory: address timezone and resume review

* memory: use local dates for foresight views

* memory: redact procedural tool outputs

* memory: address foresight and procedural review

* memory: cover vault review fixes

* memory: tighten foresight cancellation matching

* memory: add optional retrieval adapter seams (#78)

* memory: add memory v2 package boundary

* memory: rename package boundary

* memory: add retrieval router plans

* docs: plan memory package boundary hardening

* memory: clean durable rows on reset and forget

* docs: add memory architecture diagrams

* memory: align salience evidence contract

* memory: narrow foresight forget cleanup

* vault: defer kg relation self-links on import
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