Skip to content

feat: Fordham room launch plan + 325-item catalog ingestion pipeline - #2019

Merged
POWERFULMOVES merged 14 commits into
mainfrom
feat/ws4-fordham-catalog
Jul 9, 2026
Merged

feat: Fordham room launch plan + 325-item catalog ingestion pipeline#2019
POWERFULMOVES merged 14 commits into
mainfrom
feat/ws4-fordham-catalog

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Workstream 4 Deliverables

This PR brings the WS4 deliverables from research/comprehensive-analysis-2026-07-09 to main, following the merge of PR #2018 (squash, 96b8be6).

Deliverables

1. Fordham Room Launch Plan (pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md)

  • Complete rehearsal → live transition plan for fordham.room.community
  • 7-item pre-flight checklist with 3 HARD gates identified
  • 3 owner decisions required (creator_id interim, steward signature, vote-path gating)
  • 4-phase rollout: Pre-launch → Validation → Live Transition → Vote-Path Enable
  • Full rollback plan with P0/P1 trigger conditions
  • Risk assessment and verification steps

2. CATALOG 325 Ingestion Pipeline Spec (pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md)

  • 5-dimension lensing engine specification for DARKXSIDE's 325 cataloged items
  • 5 research dimensions: MAO, AIM, C&E, LFAS, CM
  • CHIT coordinate signature assignment (delta, Hz, kappa, A, F)
  • Media resonance matching against 2,082 reference media items
  • Persona grounding validation against canonical DARKXSIDE persona
  • 8 fully-worked example lensed entries

3. Catalog Lensing Engine (pmoves/tools/catalog_lensing_engine.py)

  • Full Python implementation of the 5-stage pipeline
  • Pluggable embedding providers (BGE-M3 + dummy fallback)
  • CLI interface with JSON/JSONL input support
  • Batch processing with progress logging and statistics output
  • Comprehensive grounding validation with confidence scoring

Files Added

File Description
pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md Fordham room launch plan
pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md 325-item ingestion pipeline spec
pmoves/tools/catalog_lensing_engine.py Catalog lensing engine implementation

Context

GRAPHITI Marks

  • PHI-4482::FORDHAM-LAUNCH-PLAN::2026-07-09
  • CATALOG325::LENSING-PIPELINE-SPEC::2026-07-09

Summary by CodeRabbit

  • New Features

    • Added a new catalog processing tool to turn raw items into standardized, scored results with matching and validation.
    • Added support for running the catalog workflow from the command line, including batch input, output files, and run statistics.
  • Documentation

    • Added a detailed launch plan for the Fordham Hill Community Room rollout.
    • Added a new specification document describing the catalog ingestion and scoring workflow.

Owner Decision A: APPROVED — DARKXSIDE approved using their
signing card (00000000-0000-4000-8000-000000000001) as interim
creator_id for the Fordham room CHIT validation.

- card_id: 00000000-0000-4000-8000-000000000001
- creator_id: darkxside
- interim: true (transition_to: fordham-steward)
Tracks the Fordham Hill Community Room launch from rehearsal to live.
Item #1 RESOLVED — DARKXSIDE interim creator_id configured.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@POWERFULMOVES, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 393d6b06-2b1a-4117-baea-e3c8240254f9

📥 Commits

Reviewing files that changed from the base of the PR and between 55249d9 and 3bab24a.

📒 Files selected for processing (9)
  • FORDHAM_ROOM_LAUNCH_PLAN.md
  • pmoves/config/agent_signatures.yaml
  • pmoves/config/rooms/fordham.room.community.json
  • pmoves/config/signing_identity_cards.yaml
  • pmoves/configs/agent-teams.yaml
  • pmoves/data/test_catalog_8.json
  • pmoves/data/test_catalog_8_lensed.json
  • pmoves/docs/research/CATALOG_325_EXAMPLES.md
  • pmoves/tools/catalog_lensing_engine.py
📝 Walkthrough

Walkthrough

This PR adds a Fordham Hill Community Room launch plan (root and operations-doc versions) tracking rehearsal-to-live rollout decisions, plus interim meta.chit metadata in the room manifest. Separately, it adds a CATALOG 325 ingestion pipeline specification and a corresponding Python CLI tool implementing normalization, lens scoring, CHIT coordinate assignment, media resonance matching, and persona grounding validation.

Changes

Fordham room CHIT launch plan

Layer / File(s) Summary
Room manifest interim CHIT metadata
pmoves/config/rooms/fordham.room.community.json
Adds a meta.chit object with card_id, creator_id, interim, and transition_to fields.
Root-level launch plan and checklist
FORDHAM_ROOM_LAUNCH_PLAN.md
Adds a launch-plan document with owner decisions log, CHIT activation checklist, activation sequence, related files, and change log.
Operations launch plan, decisions, execution, rollback, verification
pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md
Adds a detailed operations plan covering pre-flight checklist, creator_id/steward/vote-path decisions, phased execution, rollback plan, live verification, file list, risk assessment, agent ACKs, and appendices.

Catalog 325 lensing pipeline

Layer / File(s) Summary
Ingestion pipeline specification
pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md
Documents normalized item schema, dimension scoring, CHIT coordinate formulas, media resonance algorithm, pseudocode stages, output schema, examples, and implementation plan.
Data model and utility helpers
pmoves/tools/catalog_lensing_engine.py
Defines dataclasses (DimensionScores, CHITSignature, MediaResonance, GroundingResult, NormalizedItem, LensedCatalogEntry) and utility functions (clamp, cosine similarity, KL divergence, item ID generation) plus ItemNormalizer.
Embedding providers
pmoves/tools/catalog_lensing_engine.py
Implements DummyEmbeddingProvider and BGEM3Provider classes for text embedding.
Lensing, CHIT assignment, resonance matching, grounding
pmoves/tools/catalog_lensing_engine.py
Implements LensingEngine, CHITCoordinateAssignment, MediaResonanceMatcher, and PersonaGroundingValidator classes.
Pipeline orchestration and CLI
pmoves/tools/catalog_lensing_engine.py
Adds CatalogLensingPipeline orchestrator and CLI main() for loading input, running the pipeline, and writing output/stats.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • POWERFULMOVES/PMOVES.AI#1993: Both PRs modify pmoves/config/rooms/fordham.room.community.json, with this PR adding interim meta.chit fields to that manifest.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the changes well, but it omits the template's Testing, Required Checks, Review Coordination, and Reviewer Notes sections. Add the missing template sections, especially Testing commands/output and the required checkboxes for contracts, docs, and review coordination.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main additions: the Fordham room launch plan and the catalog ingestion pipeline.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ws4-fordham-catalog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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: 55249d988b

ℹ️ 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".

"alter": "fordham-community",
"room_type": "hybrid",
"owner_mode": "shared",
"meta": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the room manifest schema-compatible

Adding the top-level meta block makes this cataloged room fail the existing room manifest gate: I checked pmoves/scripts/validate_room_manifests.py, and it reports fordham.room.community: Additional properties are not allowed ('meta' was unexpected) because room.manifest.v1.schema.json has additionalProperties: false at the manifest root. Until the schema is extended or the CHIT data is placed in an allowed field, any validation/CI path that loads the room catalog will fail on this room.

Useful? React with 👍 / 👎.

Comment thread pmoves/tools/catalog_lensing_engine.py Outdated
self.media_embeddings = media_embeddings
self.media_catalog = media_catalog or []

dim = 384

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Size form weights from the embedding model

With the default --model BAAI/bge-m3 and the BGE-M3 media embeddings described by the new spec, the item embedding is 1024-D, but these form weights are hard-coded to 384-D. When media matching is enabled, embedding * form_weights will raise a NumPy shape/broadcast error before computing similarities, so the pipeline cannot run its advertised media-resonance stage against the 2,082-item BGE-M3 corpus.

Useful? React with 👍 / 👎.

Comment thread pmoves/tools/catalog_lensing_engine.py Outdated
Comment on lines +472 to +473
FORM_RULES: List[Tuple[str, callable]] = [
("grounded", lambda s: all(d > 0.3 for d in s.values_list())),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Test specific CHIT forms before the catch-all

Because _assign_form() returns the first matching rule, putting grounded first causes any item with all five dimensions above 0.3 to be labeled only grounded, even when it also satisfies a more specific form such as architect, sovereign, or dual_state. Those form labels drive the resonance weighting and form-distribution stats, so broadly-scored catalog items get misclassified instead of receiving their dominant CHIT shape.

Useful? React with 👍 / 👎.

…sion scoring, CHIT coordinates, media resonance

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 11

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@FORDHAM_ROOM_LAUNCH_PLAN.md`:
- Around line 41-48: The activation sequence fence is unlabeled, which triggers
markdownlint MD040. Update the fenced block in FORDHAM_ROOM_LAUNCH_PLAN so the
step list is tagged with a language such as text or bash, keeping the existing
content under the fence unchanged.

In `@pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md`:
- Around line 200-204: Update the rollback guidance to target the nested
manifest field used by the change, namely meta.chit.creator_id, instead of a
top-level creator_id. Also replace the blanket sed-based JSON blob edit with a
rollback step that only updates that specific nested field, so the instructions
in this section align with the manifest structure and avoid touching unrelated
content.
- Line 241: The markdown table row for the Catalog entry is being split by the
unescaped jq pipe characters, causing the markdownlint warning. Update the row
in the Fordham room launch plan so the command in the table no longer uses raw
`|` separators—escape those pipes or move the jq example out of the table while
keeping the entry readable.
- Around line 36-50: Update the Fordham launch gate table so it matches the
current room metadata and schema evidence. Recheck the entries tied to
`meta.chit.card_id` in the room manifest and the schema-validation row, then
revise the row statuses/evidence so the PASS/FAIL labels align with the actual
contract being validated. Also recalculate the hard-gate summary after fixing
the stale row data, using the table entries and summary section in
`FORDHAM_ROOM_LAUNCH_PLAN.md`.

In `@pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md`:
- Around line 1019-1059: The catalog lensing spec is out of sync with
`catalog_lensing_engine.py`: the documented `--prototypes` option is not
accepted by the CLI, and `--validate` is also missing while `--stage` and
`--batch-size` are unused. Update the Makefile target and CLI spec to match the
actual entrypoint arguments in `catalog_lensing_engine.py` and its argument
parser, either by removing unsupported options or implementing them consistently
in the parser and pipeline wiring. Ensure the documented `catalog-lens`
invocation only passes flags that the script actually handles.
- Around line 244-262: The form-selection pseudocode in the catalog ingestion
spec has an ordering mismatch with the worked examples and the
catalog_lensing_engine form logic. Reorder the entries in the forms mapping so
the more specific matches like grounded and the pure_* forms are checked before
broader forms such as orchestrator, and keep the “select first matching form”
rule aligned with the implementation in catalog_lensing_engine. Ensure the
examples and the forms table describe the same precedence.
- Around line 208-214: The novelty calculation uses an invalid prior
distribution in the delta/KL divergence flow, so normalize DARKXSIDE_PRIOR
before computing KL divergence. Update the prior in the catalog ingestion spec
and the corresponding logic in catalog_lensing_engine’s novelty computation so
the values sum to 1.0, then keep the delta clamp as-is and verify any worked
examples reflect the normalized prior.

In `@pmoves/tools/catalog_lensing_engine.py`:
- Line 469: The DARKXSIDE_PRIOR constant in catalog_lensing_engine.py is not a
valid probability distribution because its values sum to more than 1, which
breaks the KL divergence used for novelty scoring. Update DARKXSIDE_PRIOR in the
catalog_lensing_engine module to a normalized distribution that sums to 1, and
make the same correction in the corresponding spec definition so the ingest
pipeline and code stay consistent.
- Around line 813-828: The CLI in main() is exposing arguments that don’t match
the documented behavior: add support for the missing --prototypes option used by
the Makefile target, and either wire --stage and --batch-size through the
pipeline logic or remove them from argparse if they are not implemented. Use the
existing main() parser setup and the downstream stage execution/batching code in
catalog_lensing_engine.py to ensure the parsed options are actually consumed.
- Around line 894-896: The CLI summary block in catalog_lensing_engine.py
assumes get_stats() always returns populated metrics, but when process_batch()
yields no results it returns an empty dict and the logging lines then raise
KeyError. Update the summary/reporting logic around pipeline.get_stats(results)
and the subsequent logger.info / summary print block to handle empty stats
defensively, either by skipping the summary when results is empty or by using
safe defaults for grounding_rate, grounded_items, total_items, resonance, and
dimension_stats.
- Around line 546-556: The `form_weights` initialization in the catalog lensing
engine is using `hash(form)`, which is not stable across Python runs. Update the
weight seeding logic in the constructor that builds `self.form_weights` to
derive a deterministic seed from each form name (for example via a stable digest
such as `sha256`), so the generated vectors and resonance scores are
reproducible across processes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2751f11d-906d-4aa6-b098-e5b99b089726

📥 Commits

Reviewing files that changed from the base of the PR and between 96b8be6 and 55249d9.

📒 Files selected for processing (5)
  • FORDHAM_ROOM_LAUNCH_PLAN.md
  • pmoves/config/rooms/fordham.room.community.json
  • pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md
  • pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md
  • pmoves/tools/catalog_lensing_engine.py

Comment thread FORDHAM_ROOM_LAUNCH_PLAN.md
Comment thread pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md
Comment on lines +200 to +204
| CHIT signing failures in production | **P0** | Immediately revert `creator_id` to `null`, stage back to `rehearsal` |
| NATS subject flood / malformed events | **P0** | Disable `allow_nats_emit` in policies, restart room container |
| Schema validation errors post-merge | **P1** | Revert PR, re-stage to `rehearsal`, investigate in staging |
| Sign-trail advisory escalates to error | **P1** | Switch `CHIT_REQUIRE_SIGNATURE` to `false` (advisory mode), warn don't block |
| Vote path accidentally enabled | **P1** | Immediately set `ballot-receipt.enabled: false`, redeploy |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Point rollback at the actual nested field.

The manifest change stores the interim identity under meta.chit.creator_id, but this rollback text refers to a top-level creator_id and the sed example edits the whole JSON blob blindly. That risks leaving the interim identity in place or mutating unrelated strings.

🛠 Suggested rollback edit
-| CHIT signing failures in production | **P0** | Immediately revert `creator_id` to null, stage back to `rehearsal` |
+| CHIT signing failures in production | **P0** | Immediately clear `meta.chit.creator_id` and stage back to `rehearsal` |
-sed -i 's/"live"/"rehearsal"/g' pmoves/config/rooms/fordham.room.community.json
+jq '.stage = "rehearsal" | .meta.chit.creator_id = null' pmoves/config/rooms/fordham.room.community.json > /tmp/fordham.room.community.json && mv /tmp/fordham.room.community.json pmoves/config/rooms/fordham.room.community.json
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md` around lines 200 - 204,
Update the rollback guidance to target the nested manifest field used by the
change, namely meta.chit.creator_id, instead of a top-level creator_id. Also
replace the blanket sed-based JSON blob edit with a rollback step that only
updates that specific nested field, so the instructions in this section align
with the manifest structure and avoid touching unrelated content.

Source: Path instructions

| # | Check | Command / Endpoint | Expected Result |
|---|-------|-------------------|-----------------|
| 5.1 | Manifest stage | `jq '.stage' fordham.room.community.json` | `"live"` or field absent (default live) |
| 5.2 | Catalog entry | `jq '.rooms[] | select(.room_id=="fordham.room.community") | .summary' catalog.json` | No "rehearsal" or "DRAFT" in text |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Escape the pipes in the jq example.

The | characters in this row are being parsed as extra table columns, which is what markdownlint is warning about. Escape them or move the command out of the table.

🛠 Suggested fix
-| 5.2 | Catalog entry | `jq '.rooms[] | select(.room_id=="fordham.room.community") | .summary' catalog.json` | No "rehearsal" or "DRAFT" in text |
+| 5.2 | Catalog entry | `jq '.rooms[] \| select(.room_id=="fordham.room.community") \| .summary' catalog.json` | No "rehearsal" or "DRAFT" in text |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| 5.2 | Catalog entry | `jq '.rooms[] | select(.room_id=="fordham.room.community") | .summary' catalog.json` | No "rehearsal" or "DRAFT" in text |
| 5.2 | Catalog entry | `jq '.rooms[] \| select(.room_id=="fordham.room.community") \| .summary' catalog.json` | No "rehearsal" or "DRAFT" in text |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 241-241: Table column count
Expected: 4; Actual: 6; Too many cells, extra data will be missing

(MD056, table-column-count)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/docs/operations/FORDHAM_ROOM_LAUNCH_PLAN.md` at line 241, The markdown
table row for the Catalog entry is being split by the unescaped jq pipe
characters, causing the markdownlint warning. Update the row in the Fordham room
launch plan so the command in the table no longer uses raw `|` separators—escape
those pipes or move the jq example out of the table while keeping the entry
readable.

Source: Linters/SAST tools

Comment on lines +208 to +214
**delta (novelty)** — computed as KL divergence from DARKXSIDE's typical dimension distribution:
```python
darkxside_prior = [0.35, 0.25, 0.20, 0.30, 0.15] # typical dimension weights
item_dist = normalize([mao, aim, ce, lfas, cm])
delta = kl_divergence(item_dist, darkxside_prior)
delta = clamp(delta / 2.0, 0.0, 1.0) # normalize to [0,1]
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

DARKXSIDE_PRIOR does not sum to 1.0 — KL divergence is invalid.

The prior [0.35, 0.25, 0.20, 0.30, 0.15] sums to 1.25, not 1.0. KL divergence requires both distributions to be probability distributions. The implementation at pmoves/tools/catalog_lensing_engine.py:469 inherits this bug, producing incorrect delta (novelty) values. The worked examples (e.g., Example 1: delta=0.35) were likely computed with this un-normalized prior and may also be incorrect.

🔧 Proposed fix
-darkxside_prior = [0.35, 0.25, 0.20, 0.30, 0.15]  # typical dimension weights
+# Normalized to sum to 1.0
+darkxside_prior = [0.28, 0.20, 0.16, 0.24, 0.12]  # typical dimension weights
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**delta (novelty)** — computed as KL divergence from DARKXSIDE's typical dimension distribution:
```python
darkxside_prior = [0.35, 0.25, 0.20, 0.30, 0.15] # typical dimension weights
item_dist = normalize([mao, aim, ce, lfas, cm])
delta = kl_divergence(item_dist, darkxside_prior)
delta = clamp(delta / 2.0, 0.0, 1.0) # normalize to [0,1]
```
**delta (novelty)** — computed as KL divergence from DARKXSIDE's typical dimension distribution:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md` around lines 208 - 214,
The novelty calculation uses an invalid prior distribution in the delta/KL
divergence flow, so normalize DARKXSIDE_PRIOR before computing KL divergence.
Update the prior in the catalog ingestion spec and the corresponding logic in
catalog_lensing_engine’s novelty computation so the values sum to 1.0, then keep
the delta clamp as-is and verify any worked examples reflect the normalized
prior.

Comment thread pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md
Comment thread pmoves/tools/catalog_lensing_engine.py Outdated
class CHITCoordinateAssignment:
"""Compute 5D CHIT signature from dimension scores."""

DARKXSIDE_PRIOR = np.array([0.35, 0.25, 0.20, 0.30, 0.15], dtype=np.float32)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

DARKXSIDE_PRIOR sums to 1.25 — KL divergence is invalid.

np.array([0.35, 0.25, 0.20, 0.30, 0.15]) sums to 1.25, not 1.0. KL divergence requires both p and q to be probability distributions. This produces incorrect delta (novelty) values for every item. The spec at pmoves/docs/specs/CATALOG_325_INGESTION_PIPELINE.md:210 defines the same values — both need fixing.

🔧 Proposed fix
-    DARKXSIDE_PRIOR = np.array([0.35, 0.25, 0.20, 0.30, 0.15], dtype=np.float32)
+    DARKXSIDE_PRIOR = np.array([0.35, 0.25, 0.20, 0.30, 0.15], dtype=np.float32)
+    DARKXSIDE_PRIOR = DARKXSIDE_PRIOR / DARKXSIDE_PRIOR.sum()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
DARKXSIDE_PRIOR = np.array([0.35, 0.25, 0.20, 0.30, 0.15], dtype=np.float32)
DARKXSIDE_PRIOR = np.array([0.35, 0.25, 0.20, 0.30, 0.15], dtype=np.float32)
DARKXSIDE_PRIOR = DARKXSIDE_PRIOR / DARKXSIDE_PRIOR.sum()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/tools/catalog_lensing_engine.py` at line 469, The DARKXSIDE_PRIOR
constant in catalog_lensing_engine.py is not a valid probability distribution
because its values sum to more than 1, which breaks the KL divergence used for
novelty scoring. Update DARKXSIDE_PRIOR in the catalog_lensing_engine module to
a normalized distribution that sums to 1, and make the same correction in the
corresponding spec definition so the ingest pipeline and code stay consistent.

Comment thread pmoves/tools/catalog_lensing_engine.py Outdated
Comment on lines +546 to +556
dim = 384
self.form_weights: Dict[str, np.ndarray] = {}
for form in [
"orchestrator", "memory_weaver", "phase_hunter", "sovereign",
"culture_seed", "architect", "material_scientist", "dual_state",
"hybrid", "grounded", "pure_mao", "pure_aim", "pure_ce",
"pure_lfas", "pure_cm", "unclassified",
]:
rng = np.random.RandomState(hash(form) % (2**31))
w = rng.uniform(0.8, 1.2, size=dim).astype(np.float32)
self.form_weights[form] = w / np.linalg.norm(w)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== catalog_lensing_engine around MediaResonanceMatcher ==\n'
ast-grep outline pmoves/tools/catalog_lensing_engine.py --view expanded | sed -n '1,220p'

printf '\n== relevant slices ==\n'
sed -n '500,620p' pmoves/tools/catalog_lensing_engine.py

printf '\n== embedding provider definitions ==\n'
rg -n "class .*Provider|def encode|BGEM3Provider|embedding_provider" pmoves -g '*.py'

Repository: POWERFULMOVES/PMOVES.AI

Length of output: 19426


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1158,1215p' pmoves/tools/catalog_lensing_engine.py

printf '\n== hash/form seed references ==\n'
rg -n "hash\(form\)|form_weights|np\.random\.RandomState|embedding_dim|384" pmoves/tools/catalog_lensing_engine.py

Repository: POWERFULMOVES/PMOVES.AI

Length of output: 3032


Use a deterministic seed for form_weights hash(form) is randomized per Python process, so these weights — and the resulting media resonance scores — can change between runs. A stable seed (for example sha256) would make the matcher reproducible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/tools/catalog_lensing_engine.py` around lines 546 - 556, The
`form_weights` initialization in the catalog lensing engine is using
`hash(form)`, which is not stable across Python runs. Update the weight seeding
logic in the constructor that builds `self.form_weights` to derive a
deterministic seed from each form name (for example via a stable digest such as
`sha256`), so the generated vectors and resonance scores are reproducible across
processes.

Comment thread pmoves/tools/catalog_lensing_engine.py Outdated
Comment thread pmoves/tools/catalog_lensing_engine.py Outdated
Steward card (00000000-0000-4000-8000-000000000038) created and
signing identity card added to registry. Transition date set.
Card 00000000-0000-4000-8000-000000000038 for community steward.
SSH fingerprint pending operator ssh-keygen. H-half synced with
agent_signatures.yaml fordham-steward entry.
Owner Decision B: APPROVED — Create fordham-steward agent.
Adds community_manager archetype signature for Fordham Hill room lifecycle,
vote governance, and member onboarding.
Add transition_date and steward_card_id to the CHIT block.
Transition scheduled for 2026-07-16 to fordham-steward
(card 00000000-0000-4000-8000-000000000038).
The `- hf_agent` and `- hf_research_agent` entries in the research team
were at 2-space indentation instead of 6-space, causing a YAML parse error
that broke validate-agents-config CI gate.

Fixes validate-agents-config failure in PR #2019.
@POWERFULMOVES
POWERFULMOVES merged commit 1126392 into main Jul 9, 2026
20 checks passed
@POWERFULMOVES
POWERFULMOVES deleted the feat/ws4-fordham-catalog branch July 9, 2026 01:06
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