Skip to content

Clustering threshold checked per-agent-invocation instead of cumulative #17

Description

@proofoftom

Summary

agents/observer.md says:

When 5+ instincts share a domain, flag for evolution

But the check is delegated to whatever observer invocation is running — and each invocation only knows about the instincts it has just inspected. Result: when multiple observer runs each contribute to the same domain over time, no single run sees the cumulative cluster, so the evolution flag is never set.

Symptom from a real run

I ran 10 observer agents in parallel against chunks of a 3-month backlog. Their reports included things like:

Domain Distribution: tooling: 8, debugging: 12, git: 10, code-style: 9...
No clustering detected — max 7 in any domain (threshold: 5+)

Both clauses contradict each other. The agent saw global counts of 8/12/10/9 but reported "no clustering" because it was counting only its own chunk's contributions and comparing against the per-agent-run quantity.

After all 10 agents finished, the cumulative counts were tooling: 21, debugging: 14, git: 11, code-style: 11, file-organization: 10, communication: 8, testing: 5 — every domain exceeded threshold. None were flagged. I had to update identity.json.evolution.ready manually.

Suggested fix

The clustering check should not be the agent's responsibility. Either:

  1. Compute outside the agent. A Python/bash script run after observer invocations recounts grep -h "^domain:" instincts/personal/*.md | sort | uniq -c, compares against threshold, and writes evolution.ready. The agent's only job is to write instincts.
  2. Same as the identity-drift fix (#new identity-drift issue). If instincts.personal is computed from the filesystem on read, evolution.ready can be too — /homunculus:evolve would just grep ... | awk '$1>=5' at invocation time.

(2) is the cleanest — clustering is a query, not state.

Related

Context

  • Plugin: 2.0.0-alpha
  • 10 parallel observer invocations over chunked observations, 80 instincts written, 0 clusters auto-flagged

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions