Skip to content

Teach relationship recognition in the in-app local agent's imperative rule too #2467

Closed

Description

@mstomar125

Problem

#2383 fixed the "agents default a person/team/entity field to text instead of a relationship" defect, but only in packages/skill/references/cli.md's hand-written prose (consumed by external PTY agents reading the markdown skill). The parallel imperative form of the same rule — packages/agent/src/skill_rules.rs::RELATIONSHIP_VS_FIELD, which is what the in-app local agent actually reads from its system prompt via seed_skill_nodes() — was deliberately left untouched, since it's outside the packages/agent boundary.

This means the in-app local agent gets zero benefit from the #2383 fix: it still has only the original terse rule ("use relationships (not fields) when a field references another node type") with no worked examples or false-friends list, so it will very likely still default deciders/assignee/etc. to text fields.

What's needed

Update RELATIONSHIP_VS_FIELD's imperative field in packages/agent/src/skill_rules.rs with the same worked-examples + false-friends content already added to cli.md's prose form (see the merged #2466 diff for the exact wording to adapt) — mirroring how GROUPING_IS_COLLECTIONS in the same file already keeps both its imperative and prose forms in sync.

Context

Flagged during #2466's code review. Filed rather than fixed directly — this touches packages/agent, which is Michael's lane.

Activity

  1. mstomar125 commented on Sep 15, 2026

    @mstomar125
    ContributorAuthor

    Unblocked — confirmed with the user Michael isn't actively working in packages/agent right now, so this is safe to pick up (mirrors the already-shipped fix from #2383, low collision risk).

    Moving to Todo, assigning.

  2. self-assigned this
    on Sep 15, 2026
  3. mstomar125 commented on Sep 15, 2026

    @mstomar125
    ContributorAuthor

    Baseline (frontend): 243 test files passed, 4967 tests passed.

  4. added a commit that references this issue on Sep 15, 2026
  5. mstomar125 commented on Sep 15, 2026

    @mstomar125
    ContributorAuthor

    Fixed in #2628 (merged, `3551459f`). Ported the worked-examples + false-friends content from cli.md's prose form into `RELATIONSHIP_VS_FIELD`'s `imperative` field in `packages/agent/src/skill_rules.rs`, mirroring `GROUPING_IS_COLLECTIONS`'s existing dual-form pattern. Regenerated the affected prompt-assembly golden. Verified via `prompt_assembly_snapshot` (5/5), full `nodespace-agent` suite, `skill_md_generation` (confirms cli.md's prose form is untouched/still in sync), and the full local pre-push gate.

    Filed #2629 as a non-blocking follow-up: there's no automated check tying skill_rules.rs's `imperative`/`prose` fields to cli.md's hand-written prose (confirmed pre-existing for `GROUPING_IS_COLLECTIONS` too, not introduced by this PR) — worth a real fix but out of scope here and needs Michael's input on the right shape (packages/agent lane).

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions